[cfe-commits] r90368 - /cfe/trunk/lib/Lex/PPMacroExpansion.cpp

Chris Lattner clattner at apple.com
Wed Dec 2 17:08:20 PST 2009


Nice!  -fexceptions too?  Also, please mention this in the doc:
http://clang.llvm.org/docs/LanguageExtensions.html#feature_check

It would be reasonable to add a new subsection of that anchor for  
'feature checks for standard language features'.

Thanks Ted,

-Chris

On Dec 2, 2009, at 5:02 PM, Ted Kremenek wrote:

> Author: kremenek
> Date: Wed Dec  2 19:02:35 2009
> New Revision: 90368
>
> URL: http://llvm.org/viewvc/llvm-project?rev=90368&view=rev
> Log:
> Add "has_feature" support for C++ RTTI.
>
> Modified:
>    cfe/trunk/lib/Lex/PPMacroExpansion.cpp
>
> Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=90368&r1=90367&r2=90368&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
> +++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Wed Dec  2 19:02:35 2009
> @@ -483,6 +483,9 @@
>
>   switch (II->getLength()) {
>   default: return false;
> +  case 4:
> +    if (II->isStr("rtti")) return LangOpts.RTTI;
> +    return false;
>   case 6:
>     if (II->isStr("blocks")) return LangOpts.Blocks;
>     return false;
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list