================ @@ -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; ---------------- python3kgae wrote:
It only ignores when the value matches. If not match, error will be reported. 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