aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/nullptr.cpp
diff options
context:
space:
mode:
authorJordy Rose <jediknil@belkadan.com>2011-07-15 20:29:02 +0000
committerJordy Rose <jediknil@belkadan.com>2011-07-15 20:29:02 +0000
commit8f08426e6f54ed20b959018f24dbea106a00b4ad (patch)
tree54bb75070571e603eee7264423dce190cf9c91cb /test/Analysis/nullptr.cpp
parente9b5d77b7bfd3e8bba05df9914a6e8c336d68ff3 (diff)
[analyzer] GNU __null is a pointer-sized integer, not a pointer. Fixes PR10372.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135294 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/nullptr.cpp')
-rw-r--r--test/Analysis/nullptr.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Analysis/nullptr.cpp b/test/Analysis/nullptr.cpp
index b74a5abcdf..6f78baebfe 100644
--- a/test/Analysis/nullptr.cpp
+++ b/test/Analysis/nullptr.cpp
@@ -39,3 +39,11 @@ void foo4(void) {
*np = 0; // no-warning
}
+
+int pr10372(void *& x) {
+ // GNU null is a pointer-sized integer, not a pointer.
+ x = __null;
+ // This used to crash.
+ return __null;
+}
+