================ @@ -2646,6 +2646,9 @@ bool Parser::ParseCXXMemberDeclaratorBeforeInitializer( else DeclaratorInfo.SetIdentifier(nullptr, Tok.getLocation()); + if (getLangOpts().HLSL) ---------------- bob80905 wrote:
I think the crucial difference between the two is that one overload is intended to parse annotations for the purpose of creating attributes to attach to a specific declarator. The other simply parses the present attributes and fills in a ParsedAttributes object. The latter is used in `ParseHLSLBuffer`, where there is no decl to attach the attributes to yet. The former is convenient since it will attach the attributes after parsing for you. They could be combined if an extra parameter is passed, a pointer to a declarator, and then add the attributes if it's non-null, but I don't think that's really necessary. https://github.com/llvm/llvm-project/pull/96346 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits