diff options
Diffstat (limited to 'clang/test/SemaCXX/ast-print.cpp')
-rw-r--r-- | clang/test/SemaCXX/ast-print.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/ast-print.cpp b/clang/test/SemaCXX/ast-print.cpp index 44b34aa12cf..46b99e0d610 100644 --- a/clang/test/SemaCXX/ast-print.cpp +++ b/clang/test/SemaCXX/ast-print.cpp @@ -30,3 +30,14 @@ void f() switch (int a = 1) { } } +// CHECK: new (1) int; +void *operator new (typeof(sizeof(1)), int, int = 2); +void f2() { + new (1) int; +} + +// CHECK: new X; +struct X { + void *operator new (typeof(sizeof(1)), int = 2); +}; +void f2() { new X; } |