<rdar://problem/13479214> Make Clang's <stddef.h> robust against system headers defin...
authorDouglas Gregor <dgregor@apple.com>
Fri, 22 Mar 2013 00:10:49 +0000 (00:10 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 22 Mar 2013 00:10:49 +0000 (00:10 +0000)
commit96efb4a4425ebe24c783da1af6c6ae05d80ae887
tree1206fa5b3720f89d7a9522360badc67d1194e6a2
parent9e65aa35a03a94882a0f1d5dd161cb2163f4796d
<rdar://problem/13479214> Make Clang's <stddef.h> robust against system headers defining size_t/ptrdiff_t/wchar_t.

Clang's <stddef.h> provides definitions for the C standard library
types size_t, ptrdiff_t, and wchar_t. However, the system's C standard
library headers tend to provide the same typedefs, and the two
generally avoid each other using the macros
_SIZE_T/_PTRDIFF_T/_WCHAR_T. With modules, however, we need to see
*all* of the places where these types are defined, so provide the
typedefs (ignoring the macros) when modules are enabled.

llvm-svn: 177686
clang/lib/Headers/stddef.h
clang/test/Modules/Inputs/StdDef/module.map [new file with mode: 0644]
clang/test/Modules/Inputs/StdDef/other.h [new file with mode: 0644]
clang/test/Modules/Inputs/StdDef/size_t.h [new file with mode: 0644]
clang/test/Modules/stddef.m [new file with mode: 0644]