[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Headers / ms-null-ms-header-vs-stddef.cpp
blobf39a0cafaa0db3cc305d01c02ffccbbe15fa14c9
1 // RUN: %clang_cc1 -fsyntax-only -triple i686-pc-win32 -fms-compatibility -fms-compatibility-version=17.00 %s
2 // RUN: %clang_cc1 -fsyntax-only -triple i386-mingw32 %s
4 // Something in MSVC's headers (pulled in e.g. by <crtdefs.h>) defines __null
5 // to something, mimic that.
6 #define __null
8 #include <stddef.h>
10 // __null is used as a type annotation in MS headers, with __null defined to
11 // nothing in regular builds. This should continue to work even with stddef.h
12 // included.
13 void f(__null void* p) { }
15 // NULL should work fine even with __null defined to nothing.
16 void* p = NULL;