From b72bd53f7d046420fa64ff3e684b912b258a27f0 Mon Sep 17 00:00:00 2001 From: Jordy Rose Date: Fri, 15 Jul 2011 20:29:02 +0000 Subject: [analyzer] GNU __null is a pointer-sized integer, not a pointer. Fixes PR10372. llvm-svn: 135294 --- clang/test/Analysis/nullptr.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'clang/test/Analysis/nullptr.cpp') diff --git a/clang/test/Analysis/nullptr.cpp b/clang/test/Analysis/nullptr.cpp index b74a5abcdfa..6f78baebfe2 100644 --- a/clang/test/Analysis/nullptr.cpp +++ b/clang/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; +} + -- cgit v1.2.3