Initial steps to improve diagnostics when there is a NULL and
a non-pointer on the two sides of a conditional expression.
Patch by Stephen Hines and Mihai Rusu.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125995 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/nullptr.cpp b/test/SemaCXX/nullptr.cpp
index 666701c..7385fd4 100644
--- a/test/SemaCXX/nullptr.cpp
+++ b/test/SemaCXX/nullptr.cpp
@@ -46,6 +46,8 @@
(void)(1 + nullptr); // expected-error {{invalid operands to binary expression}}
(void)(0 ? nullptr : 0); // expected-error {{incompatible operand types}}
(void)(0 ? nullptr : (void*)0);
+ (void)(0 ? nullptr : A()); // expected-error {{non-pointer operand type 'A' incompatible with nullptr}}
+ (void)(0 ? A() : nullptr); // expected-error {{non-pointer operand type 'A' incompatible with nullptr}}
// Overloading
int t = o1(nullptr);