llvm-project/clang/lib
Serge Pavlov 1ecb41c09b Emit warning if define or undef reserved identifier or keyword.
Summary:
This change implements warnings if macro name is identical to a keyword or
reserved identifier. The warnings are different depending on the "danger"
of the operation. Defining macro that replaces a keyword is on by default.
Other cases produce warning that is off by default but can be turned on
using option -Wreserved-id-macro.

This change fixes PR11488.

Reviewers: rnk

Reviewed By: rnk

Subscribers: rnk, cfe-commits

Differential Revision: http://reviews.llvm.org/D6194

llvm-svn: 223114
2014-12-02 11:06:09 +00:00
..
ARCMigrate clang-format a recent commit I made 2014-11-19 05:48:40 +00:00
AST Fix typo. 2014-11-29 23:57:35 +00:00
ASTMatchers Make the function pointer a template argument instead of a runtime value. 2014-12-01 14:46:14 +00:00
Analysis When checking for uninitialized values, do not confuse "std::move" with every 2014-11-27 01:29:32 +00:00
Basic Emit warning if define or undef reserved identifier or keyword. 2014-12-02 11:06:09 +00:00
CodeGen Use nullptr to silence -Wsentinel when self-hosting on Windows 2014-12-01 22:02:27 +00:00
Driver Remove special case for aarch64 static vs. PIC code in iOS kernel code. 2014-12-02 00:27:35 +00:00
Edit Edit: Do not extend a removal to include trailing whitespace if we're at the end 2014-09-15 11:47:10 +00:00
Format clang-format: precedence-based indentation when breaking before operators. 2014-12-02 09:46:56 +00:00
Frontend [modules] Track how 'header' directives were written in module map files, 2014-12-02 00:08:08 +00:00
FrontendTool Provide a BuryPointer for unique_ptrs. 2014-08-29 16:53:14 +00:00
Headers Intercept __crt_va_* used by MSVC "14" 2014-11-20 22:44:03 +00:00
Index [CMake] Prune redundant libdeps. 2014-10-30 01:37:44 +00:00
Lex Emit warning if define or undef reserved identifier or keyword. 2014-12-02 11:06:09 +00:00
Parse [c++1z] Remove terse range-based for loops; they've been removed from 2014-11-27 01:54:27 +00:00
Rewrite Trim some includes. NFC. 2014-10-29 22:13:46 +00:00
Sema Perform correct lookup when '__super' is used in class with dependent base. 2014-12-01 23:15:01 +00:00
Serialization Try to fix the MSVC build. 2014-12-02 02:13:09 +00:00
StaticAnalyzer Use nullptr to silence -Wsentinel when self-hosting on Windows 2014-12-01 22:02:27 +00:00
Tooling Re-apply r222646 (was reverted in r222667). Adding 4 ASTMatchers: typedefDecl, isInMainFile, isInSystemFile, isInFileMatchingName 2014-11-25 17:01:06 +00:00
CMakeLists.txt Fix build with various feature flag combinations 2014-07-14 22:17:22 +00:00
Makefile Make clang's rewrite engine a core feature 2014-07-16 16:48:33 +00:00