Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions clang/lib/AST/DeclBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2149,8 +2149,7 @@ void DeclContext::makeDeclVisibleInContextImpl(NamedDecl *D, bool Internal) {
// have already checked the external source.
if (!Internal)
if (ExternalASTSource *Source = getParentASTContext().getExternalSource())
if (hasExternalVisibleStorage() &&
Map->find(D->getDeclName()) == Map->end())
if (hasExternalVisibleStorage() && !Map->contains(D->getDeclName()))
Source->FindExternalVisibleDeclsByName(this, D->getDeclName(),
D->getDeclContext());

Expand Down
5 changes: 2 additions & 3 deletions clang/lib/Serialization/ASTReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8646,9 +8646,8 @@ ASTReader::getLoadedSpecializationsLookupTables(const Decl *D, bool IsPartial) {

bool ASTReader::haveUnloadedSpecializations(const Decl *D) const {
assert(D->isCanonicalDecl());
return (PartialSpecializationsLookups.find(D) !=
PartialSpecializationsLookups.end()) ||
(SpecializationsLookups.find(D) != SpecializationsLookups.end());
return PartialSpecializationsLookups.contains(D) ||
SpecializationsLookups.contains(D);
}

/// Under non-PCH compilation the consumer receives the objc methods
Expand Down
2 changes: 1 addition & 1 deletion clang/tools/libclang/CXCursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,7 @@ unsigned clang_CXCursorSet_contains(CXCursorSet set, CXCursor cursor) {
CXCursorSet_Impl *setImpl = unpackCXCursorSet(set);
if (!setImpl)
return 0;
return setImpl->find(cursor) != setImpl->end();
return setImpl->contains(cursor);
}

unsigned clang_CXCursorSet_insert(CXCursorSet set, CXCursor cursor) {
Expand Down
4 changes: 1 addition & 3 deletions clang/utils/TableGen/ClangBuiltinTemplatesEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,8 @@ ParseTemplateParameterList(ParserState &PS,
} else if (Arg->isSubClassOf("NTTP")) {
auto Type = Arg->getValueAsString("TypeName");

if (TemplateNameToParmName.find(Type.str()) ==
TemplateNameToParmName.end()) {
if (!TemplateNameToParmName.contains(Type.str()))
PrintFatalError("Unkown Type Name");
}

auto TSIName = "TSI" + std::to_string(PS.UniqueCounter++);
Code << " auto *" << TSIName << " = C.getTrivialTypeSourceInfo(QualType("
Expand Down
Loading