================ @@ -8844,7 +8844,11 @@ static void processTypeAttrs(TypeProcessingState &state, QualType &type, } case ParsedAttr::AT_HLSLResourceClass: case ParsedAttr::AT_HLSLROV: { - if (state.getSema().HLSL().handleResourceTypeAttr(attr)) + // Only collect HLSL resource type attributes that are in + // decl-specifier-seq; do not collect attributes on declarations or those + // that get to slide after declaration name. + if (TAL == TAL_DeclSpec && + state.getSema().HLSL().handleResourceTypeAttr(attr)) ---------------- hekota wrote:
When a type attribute is on a declaration the error is reported later on after this processing happens, but we want to avoid collecting these attributes in SemaHLSL. https://github.com/llvm/llvm-project/pull/107973 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits