summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2013-12-03 06:13:01 +0000
committerAlp Toker <alp@nuanti.com>2013-12-03 06:13:01 +0000
commit67c68060853c5299f26e4a0964a3ffa9cd572c5a (patch)
tree4848482961ecc9a2d9a25c5ba603075ae8e57ffd /lib/CodeGen/CodeGenFunction.cpp
parentab823ff202b936c548ee617982da689c2cea1ac4 (diff)
downloadclang-67c68060853c5299f26e4a0964a3ffa9cd572c5a.tar.gz
clang-67c68060853c5299f26e4a0964a3ffa9cd572c5a.tar.bz2
clang-67c68060853c5299f26e4a0964a3ffa9cd572c5a.tar.xz
Emit an extension warning when changing system header tokens
clang converts keywords to identifiers for compatibility with various system headers such as GNU libc. Implement a -Wkeyword-compat extension warning to diagnose those cases. The warning is on by default but will generally be ignored in system headers. It can however be enabled globally to aid standards conformance testing. This also changes the __uptr keyword avoidance from r195710 to no longer special-case system headers, bringing it in line with other similar workarounds in clang. Implementation returns bool for symmetry with token annotation functions. Some examples: warning: keyword '__is_pod' will be treated as an identifier for the remainder of the translation unit [-Wkeyword-compat] struct __is_pod warning: keyword '__uptr' will be treated as an identifier here [-Wkeyword-compat] union w *__uptr; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196212 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions