================
@@ -195,6 +195,25 @@ bool Parser::ParseSingleGNUAttribute(ParsedAttributes
&Attrs,
// Handle attributes with arguments that require late parsing.
LateParsedAttribute *LA =
new LateParsedAttribute(this, *AttrName, AttrNameLoc);
+
+ // Keep the innermost prototype's parameters available in case they are
needed
+ // by late-parsing attributes. A function keeps its own parameters in scope,
+ // so skip it; a parameter of function type is adjusted to a pointer, so keep
+ // it.
+ if (D && (!D->isFunctionDeclarator() || D->isPrototypeContext())) {
----------------
vtjnash wrote:
You've got a good eye for asking the right questions here. Yes, that was indeed
necessary too.
https://github.com/llvm/llvm-project/pull/212615
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits