summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/Inputs/ms-keyword-system-header.h
Commit message (Collapse)AuthorAgeFilesLines
* Make the -Wkeyword-compat diag message more accurateAlp Toker2013-12-091-1/+1
| | | | | | | | | | | | | | | | Changed from: keyword '__is_empty' will be treated as an identifier for the remainder of the translation unit To: keyword '__is_empty' will be made available as an identifier for the remainder of the translation unit This is a more accurate description of clang's keyword compatibility feature, given that some of the keywords are turned into context-sensitive keywords (e.g. REVERTIBLE_TYPE_TRAIT) rather than being fully disabled. llvm-svn: 196776
* Emit an extension warning when changing system header tokensAlp Toker2013-12-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 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; llvm-svn: 196212
* Unbreak -fms-extensions with GNU libc headersAlp Toker2013-11-261-0/+6
GNU libc uses '__uptr' as a member name in C mode, conflicting with the eponymous MSVC pointer modifier keyword. Detect and mark the token as an identifier when these specific conditions are met. __uptr will continue to work as a keyword for the remainder of the translation unit. Fixes PR17824. llvm-svn: 195710
OpenPOWER on IntegriCloud