diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-12-01 17:31:21 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-12-01 17:31:21 +0000 |
commit | ac72d40340ce3eb6ffa932ede41631d666084fec (patch) | |
tree | 19345ccc8eab9f11570d22009b658702c3bd3287 | |
parent | 28d6cba4c472fca54c77cba34c15802a634984af (diff) |
Add the test for __null
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60357 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/SemaCXX/__null.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaCXX/__null.cpp b/test/SemaCXX/__null.cpp new file mode 100644 index 0000000000..cc04ebca49 --- /dev/null +++ b/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]; +} |