[cfe-commits] r112671 - in /cfe/trunk: docs/LanguageExtensions.html lib/Lex/PPMacroExpansion.cpp test/Lexer/has_feature_cxx0x.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Tue Aug 31 16:28:47 PDT 2010


Author: cornedbee
Date: Tue Aug 31 18:28:47 2010
New Revision: 112671

URL: http://llvm.org/viewvc/llvm-project?rev=112671&view=rev
Log:
Implement __has_feature(cxx_inline_namespaces)

Modified:
    cfe/trunk/docs/LanguageExtensions.html
    cfe/trunk/lib/Lex/PPMacroExpansion.cpp
    cfe/trunk/test/Lexer/has_feature_cxx0x.cpp

Modified: cfe/trunk/docs/LanguageExtensions.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/LanguageExtensions.html?rev=112671&r1=112670&r2=112671&view=diff
==============================================================================
--- cfe/trunk/docs/LanguageExtensions.html (original)
+++ cfe/trunk/docs/LanguageExtensions.html Tue Aug 31 18:28:47 2010
@@ -40,6 +40,7 @@
   <li><a href="#cxx_static_assert">C++0x <tt>static_assert()</tt></a></li>
   <li><a href="#cxx_auto_type">C++0x type inference</a></li>
   <li><a href="#cxx_variadic_templates">C++0x variadic templates</a></li>
+  <li><a href="#cxx_inline_namespaces">C++0x inline namespaces</a></li>
   </ul>
 <li><a href="#blocks">Blocks</a></li>
 <li><a href="#overloading-in-c">Function Overloading in C</a></li>
@@ -301,32 +302,34 @@
 <h3 id="cxx_attributes">C++0x attributes</h3>
 
 <p>Use <tt>__has_feature(cxx_attributes)</tt> to determine if support for
-attribute parsing with C++0x's square bracket notation is enabled.
+attribute parsing with C++0x's square bracket notation is enabled.</p>
 
 <h3 id="cxx_deleted_functions">C++0x deleted functions</tt></h3>
 
 <p>Use <tt>__has_feature(cxx_deleted_functions)</tt> to determine if support for
-deleted function definitions (with <tt>= delete</tt>) is enabled.
+deleted function definitions (with <tt>= delete</tt>) is enabled.</p>
 
 <h3 id="cxx_concepts">C++ TR concepts</h3>
 
 <p>Use <tt>__has_feature(cxx_concepts)</tt> to determine if support for
-concepts is enabled. clang does not currently implement this feature.
+concepts is enabled. clang does not currently implement this feature.</p>
 
 <h3 id="cxx_lambdas">C++0x lambdas</h3>
 
 <p>Use <tt>__has_feature(cxx_lambdas)</tt> to determine if support for
-lambdas is enabled. clang does not currently implement this feature.
+lambdas is enabled. clang does not currently implement this feature.</p>
 
 <h3 id="cxx_nullptr">C++0x <tt>nullptr</tt></h3>
 
 <p>Use <tt>__has_feature(cxx_nullptr)</tt> to determine if support for
-<tt>nullptr</tt> is enabled. clang does not yet fully implement this feature.
+<tt>nullptr</tt> is enabled. clang does not yet fully implement this
+feature.</p>
 
 <h3 id="cxx_rvalue_references">C++0x rvalue references</tt></h3>
 
 <p>Use <tt>__has_feature(cxx_rvalue_references)</tt> to determine if support for
-rvalue references is enabled. clang does not yet fully implement this feature.
+rvalue references is enabled. clang does not yet fully implement this
+feature.</p>
 
 <h3 id="cxx_static_assert">C++0x <tt>static_assert()</tt></h3>
 
@@ -339,12 +342,17 @@
 is supported using the <tt>auto</tt> specifier. If this is disabled,
 <tt>auto</tt> will instead be a storage class specifier, as in C or C++98.</p>
 
-<h3 id="cxx_variadic_templates">C++0x variadic templates</tt></h3>
+<h3 id="cxx_variadic_templates">C++0x variadic templates</h3>
 
 <p>Use <tt>__has_feature(cxx_variadic_templates)</tt> to determine if support
 for templates taking any number of arguments with the ellipsis notation is
 enabled. clang does not yet fully implement this feature.</p>
 
+<h3 id="cxx_inline_namespaces">C++0x inline namespaces</h3>
+
+<p>Use <tt>__has_feature(cxx_inline_namespaces)</tt> to determine if support for
+inline namespaces is enabled.</p>
+
 <!-- ======================================================================= -->
 <h2 id="blocks">Blocks</h2>
 <!-- ======================================================================= -->

Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=112671&r1=112670&r2=112671&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
+++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Tue Aug 31 18:28:47 2010
@@ -523,6 +523,7 @@
            .Case("ownership_holds", true)
            .Case("ownership_returns", true)
            .Case("ownership_takes", true)
+           .Case("cxx_inline_namespaces", true)
          //.Case("cxx_concepts", false)
          //.Case("cxx_lambdas", false)
          //.Case("cxx_nullptr", false)

Modified: cfe/trunk/test/Lexer/has_feature_cxx0x.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/has_feature_cxx0x.cpp?rev=112671&r1=112670&r2=112671&view=diff
==============================================================================
--- cfe/trunk/test/Lexer/has_feature_cxx0x.cpp (original)
+++ cfe/trunk/test/Lexer/has_feature_cxx0x.cpp Tue Aug 31 18:28:47 2010
@@ -99,3 +99,13 @@
 
 // CHECK-0X: no_variadic_templates
 // CHECK-NO-0X: no_variadic_templates
+
+
+#if __has_feature(cxx_inline_namespaces)
+int inline_namespaces();
+#else
+int no_inline_namespaces();
+#endif
+
+// CHECK-0X: inline_namespaces
+// CHECK-NO-0X: inline_namespaces





More information about the cfe-commits mailing list