summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-12-01 17:31:21 +0000
committerDouglas Gregor <dgregor@apple.com>2008-12-01 17:31:21 +0000
commitdc37c814488747fff4098257f4f0f72b2ce635f6 (patch)
tree41782cc22a9a383efd8d312f0c3bda305cd560de
parentf7ab50df290663597d02b8a5668866bfb57fc989 (diff)
downloadbcm5719-llvm-dc37c814488747fff4098257f4f0f72b2ce635f6.tar.gz
bcm5719-llvm-dc37c814488747fff4098257f4f0f72b2ce635f6.zip
Add the test for __null
llvm-svn: 60357
-rw-r--r--clang/test/SemaCXX/__null.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/__null.cpp b/clang/test/SemaCXX/__null.cpp
new file mode 100644
index 00000000000..cc04ebca497
--- /dev/null
+++ b/clang/test/SemaCXX/__null.cpp
@@ -0,0 +1,10 @@
+// RUN: clang %s -fsyntax-only -verify
+
+void f() {
+ int* i = __null;
+ i = __null;
+ int i2 = __null;
+
+ // Verify statically that __null is the right size
+ int a[sizeof(typeof(__null)) == sizeof(void*)? 1 : -1];
+}
OpenPOWER on IntegriCloud