Skip to content

Commit 84cb8ea

Browse files
[Sema] Use llvm::is_contained (NFC)
1 parent 06ca52e commit 84cb8ea

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9008,10 +9008,8 @@ static void handleArmNewAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
90089008
return;
90099009
}
90109010

9011-
if (std::find(NewState.begin(), NewState.end(), StateName) ==
9012-
NewState.end()) { // Avoid adding duplicates.
9011+
if (!llvm::is_contained(NewState, StateName)) // Avoid adding duplicates.
90139012
NewState.push_back(StateName);
9014-
}
90159013
}
90169014

90179015
if (auto *FPT = dyn_cast<FunctionProtoType>(D->getFunctionType())) {

0 commit comments

Comments
 (0)