aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/LangOptions.h
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-04-23 09:27:53 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-04-23 09:27:53 +0000
commit1cfe3c305c0d5393fd94167808b8f5d96cd65227 (patch)
treea32085eeef5578ac9d7268ec06b5ad170a679f26 /include/clang/Basic/LangOptions.h
parentf1cc1d0efddc40a76ab70b074792dcd7e5ca4315 (diff)
Fix Clang's __DEPRECATED define to be controled by -Wdeprecated. This
matches GCC behavior which libstdc++ uses to limit #warning-based messages about deprecation. The machinery involves threading this through a new '-fdeprecated-macro' flag for CC1. The flag defaults to "on", similarly to -Wdeprecated. We turn the flag off in the driver when the warning is turned off (modulo matching some GCC bugs). We record this as a language option, and key the preprocessor on the option when introducing the define. A separate flag rather than a '-D' flag allows us to properly represent the difference between C and C++ builds (only C++ receives the define), and it allows the specific behavior of following -Wdeprecated without potentially impacting the set of user-provided macro flags. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130055 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/LangOptions.h')
-rw-r--r--include/clang/Basic/LangOptions.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Basic/LangOptions.h b/include/clang/Basic/LangOptions.h
index 91287815cd..2b1319c1a0 100644
--- a/include/clang/Basic/LangOptions.h
+++ b/include/clang/Basic/LangOptions.h
@@ -89,6 +89,8 @@ public:
// used (instead of C99 semantics).
unsigned NoInline : 1; // Should __NO_INLINE__ be defined.
+ unsigned Deprecated : 1; // Should __DEPRECATED be defined.
+
unsigned ObjCGCBitmapPrint : 1; // Enable printing of gc's bitmap layout
// for __weak/__strong ivars.
@@ -213,6 +215,8 @@ public:
GNUInline = 0;
NoInline = 0;
+ Deprecated = 1; // -Wdeprecated defaults to "on".
+
CharIsSigned = 1;
ShortWChar = 0;
ShortEnums = 0;