diff options
Diffstat (limited to 'test/Analysis/NewDelete-variadic.cpp')
-rw-r--r-- | test/Analysis/NewDelete-variadic.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test/Analysis/NewDelete-variadic.cpp b/test/Analysis/NewDelete-variadic.cpp index 53dba46..62a7d17 100644 --- a/test/Analysis/NewDelete-variadic.cpp +++ b/test/Analysis/NewDelete-variadic.cpp @@ -5,15 +5,19 @@ namespace std { typedef __typeof__(sizeof(int)) size_t; } -void *operator new(std::size_t, ...); -void *operator new[](std::size_t, ...); +struct X {}; + +void *operator new(std::size_t, X, ...); +void *operator new[](std::size_t, X, ...); void testGlobalCustomVariadicNew() { - void *p1 = operator new(0); // no warn + X x; + + void *p1 = operator new(0, x); // no warn - void *p2 = operator new[](0); // no warn + void *p2 = operator new[](0, x); // no warn - int *p3 = new int; // no warn + int *p3 = new (x) int; // no warn - int *p4 = new int[0]; // no warn + int *p4 = new (x) int[0]; // no warn } |