diff options
Diffstat (limited to 'test/CodeGenCXX/new.cpp')
-rw-r--r-- | test/CodeGenCXX/new.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/CodeGenCXX/new.cpp b/test/CodeGenCXX/new.cpp index ca7c52f..885158f 100644 --- a/test/CodeGenCXX/new.cpp +++ b/test/CodeGenCXX/new.cpp @@ -90,9 +90,19 @@ A* t10() { return new(1, 2, 3.45, 100) A; } -struct B { }; +struct B { int a; }; void t11() { // CHECK: call noalias i8* @_Znwm // CHECK: call void @llvm.memset.p0i8.i64( B* b = new B(); } + +struct Empty { }; + +// We don't need to initialize an empty class. +void t12() { + // CHECK: define void @_Z3t12v + // CHECK-NOT: br label + // CHECK: ret void + (void)new Empty[10]; +} |