summaryrefslogtreecommitdiff
path: root/clang/test/SemaObjCXX/nullptr.mm
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaObjCXX/nullptr.mm')
-rw-r--r--clang/test/SemaObjCXX/nullptr.mm16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/SemaObjCXX/nullptr.mm b/clang/test/SemaObjCXX/nullptr.mm
new file mode 100644
index 0000000..2b29b04
--- /dev/null
+++ b/clang/test/SemaObjCXX/nullptr.mm
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -std=c++11 -fblocks -fsyntax-only -verify %s
+
+@interface A
+@end
+
+void comparisons(A *a) {
+ (void)(a == nullptr);
+ (void)(nullptr == a);
+}
+
+void assignment(A *a) {
+ a = nullptr;
+}
+
+int PR10145a = (void(^)())0 == nullptr;
+int PR10145b = nullptr == (void(^)())0;