[clang] af447dd - [Serialization] Use llvm::is_contained (NFC)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 20 23:45:31 PDT 2023
Author: Kazu Hirata
Date: 2023-10-20T23:45:20-07:00
New Revision: af447dde5e723e925b9c8fdc6715b07f0caf6161
URL: https://github.com/llvm/llvm-project/commit/af447dde5e723e925b9c8fdc6715b07f0caf6161
DIFF: https://github.com/llvm/llvm-project/commit/af447dde5e723e925b9c8fdc6715b07f0caf6161.diff
LOG: [Serialization] Use llvm::is_contained (NFC)
Added:
Modified:
clang/lib/Serialization/ASTReader.cpp
Removed:
################################################################################
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 9061efb6511db51..42b48d230af7a97 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -10115,8 +10115,7 @@ void ASTReader::pushExternalDeclIntoScope(NamedDecl *D, DeclarationName Name) {
// Adding the decl to IdResolver may have failed because it was already in
// (even though it was not added in scope). If it is already in, make sure
// it gets in the scope as well.
- if (std::find(SemaObj->IdResolver.begin(Name),
- SemaObj->IdResolver.end(), D) != SemaObj->IdResolver.end())
+ if (llvm::is_contained(SemaObj->IdResolver.decls(Name), D))
SemaObj->TUScope->AddDecl(D);
}
}
More information about the cfe-commits
mailing list