diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index daa4b095eaa8a..070246f099e2e 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -145,13 +145,12 @@ llvm::Constant *CodeGenModule::getBuiltinLibFunction(const FunctionDecl *FD, // PPC, after backend supports IEEE 128-bit style libcalls. if (getTriple().isPPC64() && &getTarget().getLongDoubleFormat() == &llvm::APFloat::IEEEquad() && - F128Builtins.find(BuiltinID) != F128Builtins.end()) + F128Builtins.contains(BuiltinID)) Name = F128Builtins[BuiltinID]; else if (getTriple().isOSAIX() && &getTarget().getLongDoubleFormat() == &llvm::APFloat::IEEEdouble() && - AIXLongDouble64Builtins.find(BuiltinID) != - AIXLongDouble64Builtins.end()) + AIXLongDouble64Builtins.contains(BuiltinID)) Name = AIXLongDouble64Builtins[BuiltinID]; else Name = Context.BuiltinInfo.getName(BuiltinID).substr(10); diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp index e7318880af8d3..f1211260e71f1 100644 --- a/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp @@ -4173,7 +4173,7 @@ void LocalInstantiationScope::InstantiatedLocal(const Decl *D, Decl *Inst) { LocalInstantiationScope *Current = this; while (Current->CombineWithOuterScope && Current->Outer) { Current = Current->Outer; - assert(Current->LocalDecls.find(D) == Current->LocalDecls.end() && + assert(!Current->LocalDecls.contains(D) && "Instantiated local in inner and outer scopes"); } #endif @@ -4197,7 +4197,7 @@ void LocalInstantiationScope::MakeInstantiatedLocalArgPack(const Decl *D) { // This should be the first time we've been told about this decl. for (LocalInstantiationScope *Current = this; Current && Current->CombineWithOuterScope; Current = Current->Outer) - assert(Current->LocalDecls.find(D) == Current->LocalDecls.end() && + assert(!Current->LocalDecls.contains(D) && "Creating local pack after instantiation of local"); #endif