================ @@ -144,6 +145,25 @@ HLSLNumThreadsAttr *SemaHLSL::mergeNumThreadsAttr(Decl *D, HLSLNumThreadsAttr(getASTContext(), AL, X, Y, Z); } +HLSLWaveSizeAttr *SemaHLSL::mergeWaveSizeAttr(Decl *D, + const AttributeCommonInfo &AL, + int Min, int Max, int Preferred, + int SpelledArgsCount) { + if (HLSLWaveSizeAttr *NT = D->getAttr<HLSLWaveSizeAttr>()) { + if (NT->getMin() != Min || NT->getMax() != Max || + NT->getPreferred() != Preferred || + NT->getSpelledArgsCount() != SpelledArgsCount) { + Diag(NT->getLocation(), diag::err_hlsl_attribute_param_mismatch) << AL; + Diag(AL.getLoc(), diag::note_conflicting_attribute); + } + return nullptr; ---------------- bob80905 wrote:
Maybe worth considering adding to docs / specs that if multiple attributes are on a decl, the first one is what's applied. I think there were some other attributes where the final attribute is what's applied, can't remember which. https://github.com/llvm/llvm-project/pull/101240 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits