[clang] [HLSL] Remove support for constructors for user defined structs (PR #190089)
Helena Kotas via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 8 12:42:20 PDT 2026
================
@@ -1527,7 +1527,10 @@ CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) {
if (D.getInit() && (Ty->isArrayType() || Ty->isRecordType()) &&
(D.isConstexpr() ||
((Ty.isPODType(getContext()) ||
- getContext().getBaseElementType(Ty)->isObjCObjectPointerType()) &&
+ getContext().getBaseElementType(Ty)->isObjCObjectPointerType() ||
+ // check if it is a constant initializer if HLSL because PODness
+ // will no longer be true for any user defined structs
----------------
hekota wrote:
Why can't the user defined structs be POD anymore? It would seem they are more likely to be POD without the constructors.
https://github.com/llvm/llvm-project/pull/190089
More information about the cfe-commits
mailing list