]> granicus.if.org Git - clang/commitdiff
Create __has_feature(cxx_noexcept) and mark it as working.
authorSebastian Redl <sebastian.redl@getdesigned.at>
Tue, 15 Mar 2011 21:17:12 +0000 (21:17 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Tue, 15 Mar 2011 21:17:12 +0000 (21:17 +0000)
Find out that our C++0x status has only one field for noexcept expression and specification together, and that it was accidentally already marked as fully implemented.
This completes noexcept specification work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127701 91177308-0d34-0410-b5e6-96231b3b80d8

docs/LanguageExtensions.html
lib/Lex/PPMacroExpansion.cpp
test/Lexer/has_feature_cxx0x.cpp

index b0de13a91e9be1fe6635eea96b07db351b7c2b8f..6bde981788824074a6e4d0e3250117dff2ceadb9 100644 (file)
@@ -46,6 +46,7 @@ td {
   <li><a href="#cxx_inline_namespaces">C++0x inline namespaces</a></li>
   <li><a href="#cxx_strong_enums">C++0x strongly-typed enumerations</a></li>
   <li><a href="#cxx_trailing_return">C++0x trailing return type</a></li>
+  <li><a href="#cxx_noexcept">C++0x noexcept specification</a></li>
   </ul>
 <li><a href="#checking_type_traits">Checks for Type Traits</a></li>
 <li><a href="#blocks">Blocks</a></li>
@@ -436,6 +437,11 @@ inline namespaces is enabled.</p>
 <p>Use <tt>__has_feature(cxx_trailing_return)</tt> to determine if support for
 the alternate function declaration syntax with trailing return type is enabled.</p>
 
+<h3 id="cxx_noexcept">C++0x noexcept</h3>
+
+<p>Use <tt>__has_feature(cxx_noexcept)</tt> to determine if support for
+noexcept exception specifications is enabled.</p>
+
 <h3 id="cxx_strong_enums">C++0x strongly typed enumerations</h3>
 
 <p>Use <tt>__has_feature(cxx_strong_enums)</tt> to determine if support for
index 10abfb4b83d1f03e96defa652b4e6b9f947fa089..858090acb843bbcfc2cdb0f7cf2a45383bab260e 100644 (file)
@@ -560,6 +560,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
            .Case("cxx_deleted_functions", LangOpts.CPlusPlus0x)
            .Case("cxx_inline_namespaces", LangOpts.CPlusPlus0x)
          //.Case("cxx_lambdas", false)
+           .Case("cxx_noexcept", LangOpts.CPlusPlus0x)
          //.Case("cxx_nullptr", false)
            .Case("cxx_reference_qualified_functions", LangOpts.CPlusPlus0x)
            .Case("cxx_rvalue_references", LangOpts.CPlusPlus0x)
index 07a3ebd38d3a6960c40df900cbd7552ef3cefbb2..ff0e85d33ac663ee821bc5c570fcde029002c465 100644 (file)
@@ -117,3 +117,12 @@ int no_default_function_template_args();
 // CHECK-0X: has_default_function_template_args
 // CHECK-NO-0X: no_default_function_template_args
 
+#if __has_feature(cxx_noexcept)
+int has_noexcept();
+#else
+int no_noexcept();
+#endif
+
+// CHECK-0X: has_noexcept
+// CHECK-NO-0X: no_noexcept
+