summaryrefslogtreecommitdiffstats
path: root/lib/Lex
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2017-05-24 00:46:27 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2017-05-24 00:46:27 +0000
commitb4d1da0e78733b71e791726473e28d513a7e5ece (patch)
tree365b3d963726568940e5765fea6a4da2a36f8ee6 /lib/Lex
parented367df541e9827f07e6c6fdef6b61ef3b491d4b (diff)
Enhance the 'diagnose_if' attribute so that we can apply it for ObjC methods and properties as well
This is an initial commit to allow using it with constant expressions, a follow-up commit will enable full support for it in ObjC methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303712 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex')
-rw-r--r--lib/Lex/PPMacroExpansion.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp
index 6c7663994a..2f141a1b20 100644
--- a/lib/Lex/PPMacroExpansion.cpp
+++ b/lib/Lex/PPMacroExpansion.cpp
@@ -1166,6 +1166,7 @@ static bool HasFeature(const Preprocessor &PP, StringRef Feature) {
.Case("objc_generics", LangOpts.ObjC2)
.Case("objc_generics_variance", LangOpts.ObjC2)
.Case("objc_class_property", LangOpts.ObjC2)
+ .Case("objc_diagnose_if_attr", LangOpts.ObjC2)
// C11 features
.Case("c_alignas", LangOpts.C11)
.Case("c_alignof", LangOpts.C11)