================
@@ -21707,6 +21707,12 @@ bool Expr::EvaluateAsInitializer(const ASTContext
&Ctx, const VarDecl *VD,
bool VarDecl::evaluateDestruction(
SmallVectorImpl<PartialDiagnosticAt> &Notes) const {
+
+ if (getType()->isPointerOrReferenceType()) {
+ ensureEvaluatedStmt()->HasConstantDestruction = true;
+ return true;
+ }
+
----------------
tbaederr wrote:
Nope, this is also called for arrays.
I think it should work to short circuit for non-records and array of non-record
element type.
https://github.com/llvm/llvm-project/pull/205476
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits