================ @@ -835,6 +835,17 @@ void Parser::ParseLexedAttribute(LateParsedAttribute &LA, Diag(Tok, diag::warn_attribute_on_function_definition) << &LA.AttrName; + 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); ---------------- AaronBallman wrote:
What if no name is found? https://github.com/llvm/llvm-project/pull/107619 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits