[clang] [SystemZ][z/OS] Implement #pragma export (PR #141671)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 7 07:53:15 PST 2026
================
@@ -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
More information about the cfe-commits
mailing list