[clang] [HLSL][RootSignature] Correct `RootSignatureParser` to use correct `SourceLocation` in diagnostics (PR #147084)

Finn Plummer via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 4 09:28:28 PDT 2025


================
@@ -22,3 +23,14 @@ void bad_root_signature_4() {}
 // expected-error at +1 {{expected ')' to denote end of parameters, or, another valid parameter of RootConstants}}
 [RootSignature("RootConstants(b0, num32BitConstants = 1, invalid)")]
 void bad_root_signature_5() {}
+
+#define MultiLineRootSignature \
+ "CBV(b0)," \
+ "RootConstants(num32BitConstants = 3, b0, invalid)"
+
+// CHECK: note: expanded from macro 'MultiLineRootSignature'
----------------
inbelic wrote:

the generation is checked using FileCheck because the `expanded from macro` note is generated by the preprocessor, which is not matchable in `verify`.

If I am missing something to make it work with `verify` that would be preferred!

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


More information about the cfe-commits mailing list