[clang] [ParserHLSL] Attempt to parse HLSL annotations on Field Decls. (PR #96346)

Damyan Pepper via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 21 11:52:37 PDT 2024


================
@@ -2646,6 +2646,9 @@ bool Parser::ParseCXXMemberDeclaratorBeforeInitializer(
   else
     DeclaratorInfo.SetIdentifier(nullptr, Tok.getLocation());
 
+  if (getLangOpts().HLSL)
----------------
damyanp wrote:

It may be worth cleaning this up: I notice that there are two overloads for MaybeParseHLSLAnnotations.  One of them checks the language inside, and the other one only asserts the language mode.  Would it be better if these two overloads behaved the same way?

https://github.com/llvm/llvm-project/pull/96346


More information about the cfe-commits mailing list