summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2015-06-29 18:11:42 +0000
committerDouglas Gregor <dgregor@apple.com>2015-06-29 18:11:42 +0000
commit4c27d104c65d0cc98d6c4c38eb6ce1ed633a5204 (patch)
treeca4accd6eee6d563634abfdbed455576e20b343d /clang/lib
parent8fee84d01ee57ddb1bf1308e7e781f377c2001fa (diff)
downloadbcm5719-llvm-4c27d104c65d0cc98d6c4c38eb6ce1ed633a5204.tar.gz
bcm5719-llvm-4c27d104c65d0cc98d6c4c38eb6ce1ed633a5204.zip
Make __has_feature(nullability) and __has_extension(nullability) always true.
These are _Underbar_capital-prefixed additions to the language that shouldn't depend on language standard. llvm-svn: 240976
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Lex/PPMacroExpansion.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp
index 3855c802aeb..d52519e3313 100644
--- a/clang/lib/Lex/PPMacroExpansion.cpp
+++ b/clang/lib/Lex/PPMacroExpansion.cpp
@@ -1052,7 +1052,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
.Case("address_sanitizer",
LangOpts.Sanitize.hasOneOf(SanitizerKind::Address |
SanitizerKind::KernelAddress))
- .Case("assume_nonnull", LangOpts.ObjC1 || LangOpts.GNUMode)
+ .Case("assume_nonnull", true)
.Case("attribute_analyzer_noreturn", true)
.Case("attribute_availability", true)
.Case("attribute_availability_with_message", true)
@@ -1077,7 +1077,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
.Case("cxx_exceptions", LangOpts.CXXExceptions)
.Case("cxx_rtti", LangOpts.RTTI)
.Case("enumerator_attributes", true)
- .Case("nullability", LangOpts.ObjC1 || LangOpts.GNUMode)
+ .Case("nullability", true)
.Case("memory_sanitizer", LangOpts.Sanitize.has(SanitizerKind::Memory))
.Case("thread_sanitizer", LangOpts.Sanitize.has(SanitizerKind::Thread))
.Case("dataflow_sanitizer", LangOpts.Sanitize.has(SanitizerKind::DataFlow))
@@ -1226,8 +1226,6 @@ static bool HasExtension(const Preprocessor &PP, const IdentifierInfo *II) {
// Because we inherit the feature list from HasFeature, this string switch
// must be less restrictive than HasFeature's.
return llvm::StringSwitch<bool>(Extension)
- .Case("assume_nonnull", true)
- .Case("nullability", true)
// C11 features supported by other languages as extensions.
.Case("c_alignas", true)
.Case("c_alignof", true)
OpenPOWER on IntegriCloud