================
@@ -1327,6 +1327,62 @@ void
Sema::AddImplicitMSFunctionNoBuiltinAttr(FunctionDecl *FD) {
FD->addAttr(NoBuiltinAttr::CreateImplicit(Context, V.data(), V.size()));
}
+NamedDecl *Sema::lookupExternCFunctionOrVariable(IdentifierInfo *IdentId,
+ SourceLocation NameLoc,
+ Scope *curScope) {
+ LookupResult Result(*this, IdentId, NameLoc, LookupOrdinaryName);
+ LookupName(Result, curScope);
+ if (!getLangOpts().CPlusPlus)
+ return Result.getAsSingle<NamedDecl>();
+ for (LookupResult::iterator I = Result.begin(); I != Result.end(); ++I) {
----------------
erichkeane wrote:
Please just do a range-for here instead. `LookupResult` has a begin/end pair,
so it should work perfect for this.
https://github.com/llvm/llvm-project/pull/141671
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits