summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-05-09 21:08:59 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-05-09 21:08:59 +0000
commit6d54014144919632594aebf76bd702883cd52250 (patch)
tree76f0928865b55169a3b50dfb4df28e624d38cc68 /clang/lib
parent65a78b5d9b9f318d27a37a173e22ea97e2dd4b84 (diff)
downloadbcm5719-llvm-6d54014144919632594aebf76bd702883cd52250.tar.gz
bcm5719-llvm-6d54014144919632594aebf76bd702883cd52250.zip
PR19698, PR19674: enable __has_feature checks for cxx_generic_lambdas and
cxx_decltype_auto, and fix documentation of cxx_generic_lambdas and cxx_init_captures to specify the right feature-check name. llvm-svn: 208445
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Lex/PPMacroExpansion.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp
index cd96f8cf34c..fa517e7fa81 100644
--- a/clang/lib/Lex/PPMacroExpansion.cpp
+++ b/clang/lib/Lex/PPMacroExpansion.cpp
@@ -918,7 +918,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
.Case("c_atomic", LangOpts.C11)
.Case("c_generic_selections", LangOpts.C11)
.Case("c_static_assert", LangOpts.C11)
- .Case("c_thread_local",
+ .Case("c_thread_local",
LangOpts.C11 && PP.getTargetInfo().isTLSSupported())
// C++11 features
.Case("cxx_access_control_sfinae", LangOpts.CPlusPlus11)
@@ -962,12 +962,17 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
.Case("cxx_aggregate_nsdmi", LangOpts.CPlusPlus1y)
.Case("cxx_binary_literals", LangOpts.CPlusPlus1y)
.Case("cxx_contextual_conversions", LangOpts.CPlusPlus1y)
- //.Case("cxx_generic_lambdas", LangOpts.CPlusPlus1y)
+ .Case("cxx_decltype_auto", LangOpts.CPlusPlus1y)
+ .Case("cxx_generic_lambdas", LangOpts.CPlusPlus1y)
.Case("cxx_init_captures", LangOpts.CPlusPlus1y)
.Case("cxx_relaxed_constexpr", LangOpts.CPlusPlus1y)
.Case("cxx_return_type_deduction", LangOpts.CPlusPlus1y)
- //.Case("cxx_runtime_arrays", LangOpts.CPlusPlus1y)
.Case("cxx_variable_templates", LangOpts.CPlusPlus1y)
+ // C++ TSes
+ //.Case("cxx_runtime_arrays", LangOpts.CPlusPlusTSArrays)
+ //.Case("cxx_concepts", LangOpts.CPlusPlusTSConcepts)
+ // FIXME: Should this be __has_feature or __has_extension?
+ //.Case("raw_invocation_type", LangOpts.CPlusPlus)
// Type traits
.Case("has_nothrow_assign", LangOpts.CPlusPlus)
.Case("has_nothrow_copy", LangOpts.CPlusPlus)
OpenPOWER on IntegriCloud