[clang] 84cb8ea - [Sema] Use llvm::is_contained (NFC)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 20 14:30:44 PST 2024
Author: Kazu Hirata
Date: 2024-01-20T14:30:30-08:00
New Revision: 84cb8eaeeb108234be1c8498688a014b87fd431d
URL: https://github.com/llvm/llvm-project/commit/84cb8eaeeb108234be1c8498688a014b87fd431d
DIFF: https://github.com/llvm/llvm-project/commit/84cb8eaeeb108234be1c8498688a014b87fd431d.diff
LOG: [Sema] Use llvm::is_contained (NFC)
Added:
Modified:
clang/lib/Sema/SemaDeclAttr.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index a482919356e1bce..2a73567c2f0513c 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -9008,10 +9008,8 @@ static void handleArmNewAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
return;
}
- if (std::find(NewState.begin(), NewState.end(), StateName) ==
- NewState.end()) { // Avoid adding duplicates.
+ if (!llvm::is_contained(NewState, StateName)) // Avoid adding duplicates.
NewState.push_back(StateName);
- }
}
if (auto *FPT = dyn_cast<FunctionProtoType>(D->getFunctionType())) {
More information about the cfe-commits
mailing list