================
@@ -5080,6 +5083,17 @@ void Parser::ParseLexedCAttribute(LateParsedAttribute
&LA, bool EnterScope,
ParseGNUAttributeArgs(&LA.AttrName, LA.AttrNameLoc, Attrs, nullptr, nullptr,
SourceLocation(), ParsedAttr::Form::GNU(), nullptr);
+ const auto &SM = PP.getSourceManager();
+ CharSourceRange ExpansionRange = SM.getExpansionRange(LA.AttrNameLoc);
+ StringRef FoundName =
+ Lexer::getSourceText(ExpansionRange, SM, PP.getLangOpts())
+ .split('(')
+ .first;
+ IdentifierInfo *MacroII = PP.getIdentifierInfo(FoundName);
----------------
rapidsna wrote:
Oops, yes, I missed the condition check here. Good catch!
https://github.com/llvm/llvm-project/pull/107619
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits