Skip to content

Commit f06deaa

Browse files
kazutakahiratagithub-actions[bot]
authored andcommitted
Automerge: [ADT] Use DenseMap::contains in EquivalenceClasses.h (NFC) (#161120)
While I am at it, this patch adds [[nodiscard]].
2 parents 139e083 + c4a5519 commit f06deaa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/include/llvm/ADT/EquivalenceClasses.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ template <class ElemTy> class EquivalenceClasses {
180180
}
181181

182182
/// Returns true if \p V is contained an equivalence class.
183-
bool contains(const ElemTy &V) const {
184-
return TheMapping.find(V) != TheMapping.end();
183+
[[nodiscard]] bool contains(const ElemTy &V) const {
184+
return TheMapping.contains(V);
185185
}
186186

187187
/// getLeaderValue - Return the leader for the specified value that is in the

0 commit comments

Comments
 (0)