================ @@ -1154,3 +1156,70 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { } return false; } + +static bool calculateIsIntangibleType(QualType Ty) { + Ty = Ty->getCanonicalTypeUnqualified(); + if (Ty->isBuiltinType()) + return Ty->isHLSLSpecificType(); + + llvm::SmallVector<QualType, 8> TypesToScan; + TypesToScan.push_back(Ty); + while (!TypesToScan.empty()) { + QualType T = TypesToScan.pop_back_val(); + assert(T == T->getCanonicalTypeUnqualified() && "expected sugar-free type"); + assert(!isa<MatrixType>(T) && "Matrix types not yet supported in HLSL"); + + if (const auto *AT = dyn_cast<ConstantArrayType>(T)) { + QualType ElTy = AT->getElementType()->getCanonicalTypeUnqualified(); + if (ElTy->isBuiltinType()) + return ElTy->isHLSLSpecificType(); ---------------- pow2clk wrote:
Currently `isHLSLSPecificType` seems to be synonymous with `isHLSLIntangibleType`, but the name suggests it might extend beyond intangible types in the future. If it is meant to only check for intangible types, perhaps it should be renamed. https://github.com/llvm/llvm-project/pull/104544 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits