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

Chris Lattner clattner at apple.com
Wed Feb 15 03:11:22 PST 2012


Nice!  This should be release noted!

-Chris

On Feb 14, 2012, at 4:35 PM, Chandler Carruth <chandlerc at google.com> wrote:

> Woot!!!
> 
> On Feb 14, 2012 1:02 PM, "Richard Smith" <richard-llvm at metafoo.co.uk> wrote:
> Author: rsmith
> Date: Tue Feb 14 16:56:17 2012
> New Revision: 150524
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=150524&view=rev
> Log:
> Advertize support for constexpr.
> 
> 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=150524&r1=150523&r2=150524&view=diff
> ==============================================================================
> --- cfe/trunk/docs/LanguageExtensions.html (original)
> +++ cfe/trunk/docs/LanguageExtensions.html Tue Feb 14 16:56:17 2012
> @@ -668,7 +668,7 @@
> 
>  <p>Use <tt>__has_feature(cxx_constexpr)</tt> to determine if support
>  for generalized constant expressions (e.g., <tt>constexpr</tt>) is
> -enabled. Clang does not currently implement this feature.</p>
> +enabled.</p>
> 
>  <h4 id="cxx_decltype">C++11 <tt>decltype()</tt></h4>
> 
> 
> Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=150524&r1=150523&r2=150524&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
> +++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Tue Feb 14 16:56:17 2012
> @@ -638,7 +638,7 @@
>            .Case("cxx_atomic", LangOpts.CPlusPlus0x)
>            .Case("cxx_attributes", LangOpts.CPlusPlus0x)
>            .Case("cxx_auto_type", LangOpts.CPlusPlus0x)
> -         //.Case("cxx_constexpr", false);
> +           .Case("cxx_constexpr", LangOpts.CPlusPlus0x)
>            .Case("cxx_decltype", LangOpts.CPlusPlus0x)
>            .Case("cxx_default_function_template_args", LangOpts.CPlusPlus0x)
>            .Case("cxx_defaulted_functions", LangOpts.CPlusPlus0x)
> 
> 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=150524&r1=150523&r2=150524&view=diff
> ==============================================================================
> --- cfe/trunk/test/Lexer/has_feature_cxx0x.cpp (original)
> +++ cfe/trunk/test/Lexer/has_feature_cxx0x.cpp Tue Feb 14 16:56:17 2012
> @@ -217,3 +217,12 @@
> 
>  // CHECK-0X: has_unicode_literals
>  // CHECK-NO-0X: no_unicode_literals
> +
> +#if __has_feature(cxx_constexpr)
> +int has_constexpr();
> +#else
> +int no_constexpr();
> +#endif
> +
> +// CHECK-0X: has_constexpr
> +// CHECK-NO-0X: no_constexpr
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120215/6c967269/attachment.html>


More information about the cfe-commits mailing list