From: Douglas Gregor Date: Mon, 1 Dec 2008 17:31:21 +0000 (+0000) Subject: Add the test for __null X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ac72d40340ce3eb6ffa932ede41631d666084fec;p=clang Add the test for __null git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60357 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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]; +}