We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c8b124 commit 43e83b9Copy full SHA for 43e83b9
clang/lib/AST/ByteCode/Compiler.cpp
@@ -3397,7 +3397,8 @@ bool Compiler<Emitter>::VisitCXXNewExpr(const CXXNewExpr *E) {
3397
CtorFunc = getFunction(CE->getConstructor());
3398
if (!CtorFunc)
3399
return false;
3400
- }
+ } else if (!DynamicInit)
3401
+ DynamicInit = Init;
3402
3403
LabelTy EndLabel = this->getLabel();
3404
LabelTy StartLabel = this->getLabel();
clang/test/AST/ByteCode/new-delete.cpp
@@ -907,6 +907,12 @@ namespace IncompleteArray {
907
return c;
908
}
909
static_assert(test4() == 12);
910
+
911
912
+ constexpr char *f(int n) {
913
+ return new char[n]();
914
+ }
915
+ static_assert((delete[] f(2), true));
916
917
918
namespace NonConstexprArrayCtor {
0 commit comments