diff options
Diffstat (limited to 'clang/test/SemaCXX/conditional-expr.cpp')
-rw-r--r-- | clang/test/SemaCXX/conditional-expr.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/conditional-expr.cpp b/clang/test/SemaCXX/conditional-expr.cpp index 3881765cff3..5637ed14c0a 100644 --- a/clang/test/SemaCXX/conditional-expr.cpp +++ b/clang/test/SemaCXX/conditional-expr.cpp @@ -311,10 +311,12 @@ namespace PR7598 { namespace PR9236 { #define NULL 0L void f() { + int i; (void)(true ? A() : NULL); // expected-error{{non-pointer operand type 'A' incompatible with NULL}} (void)(true ? NULL : A()); // expected-error{{non-pointer operand type 'A' incompatible with NULL}} (void)(true ? 0 : A()); // expected-error{{incompatible operand types}} (void)(true ? nullptr : A()); // expected-error{{non-pointer operand type 'A' incompatible with nullptr}} + (void)(true ? nullptr : i); // expected-error{{non-pointer operand type 'int' incompatible with nullptr}} (void)(true ? __null : A()); // expected-error{{non-pointer operand type 'A' incompatible with NULL}} (void)(true ? (void*)0 : A()); // expected-error{{incompatible operand types}} } |