[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)
Greg Roth via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 27 16:04:31 PDT 2024
================
@@ -5695,6 +5696,15 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT,
return true;
return false;
}
+ case UTT_IsIntangibleType:
+ assert(Self.getLangOpts().HLSL && "intangible types are HLSL-only feature");
+ if (!T->isVoidType() && !T->isIncompleteArrayType())
+ if (Self.RequireCompleteType(TInfo->getTypeLoc().getBeginLoc(), T,
+ diag::err_incomplete_type))
+ return false;
+ DiagnoseVLAInCXXTypeTrait(Self, TInfo,
----------------
pow3clk wrote:
If this identifies a VLA and returns true, should we not return false?
https://github.com/llvm/llvm-project/pull/104544
More information about the cfe-commits
mailing list