[cfe-commits] r136788 - /cfe/trunk/lib/Lex/PPMacroExpansion.cpp
Douglas Gregor
dgregor at apple.com
Wed Aug 3 10:01:05 PDT 2011
Author: dgregor
Date: Wed Aug 3 12:01:05 2011
New Revision: 136788
URL: http://llvm.org/viewvc/llvm-project?rev=136788&view=rev
Log:
Comment the weird behavior of __has_feature(is_empty) and __has_feature(is_pod)
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=136788&r1=136787&r2=136788&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
+++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Wed Aug 3 12:01:05 2011
@@ -639,6 +639,10 @@
.Case("is_base_of", LangOpts.CPlusPlus)
.Case("is_class", LangOpts.CPlusPlus)
.Case("is_convertible_to", LangOpts.CPlusPlus)
+ // __is_empty is available only if the horrible
+ // "struct __is_empty" parsing hack hasn't been needed in this
+ // translation unit. If it has, __is_empty reverts to a normal
+ // identifier and __has_feature(is_empty) evaluates false.
.Case("is_empty",
LangOpts.CPlusPlus &&
PP.getIdentifierInfo("__is_empty")->getTokenID()
@@ -646,6 +650,10 @@
.Case("is_enum", LangOpts.CPlusPlus)
.Case("is_literal", LangOpts.CPlusPlus)
.Case("is_standard_layout", LangOpts.CPlusPlus)
+ // __is_pod is available only if the horrible
+ // "struct __is_pod" parsing hack hasn't been needed in this
+ // translation unit. If it has, __is_pod reverts to a normal
+ // identifier and __has_feature(is_pod) evaluates false.
.Case("is_pod",
LangOpts.CPlusPlus &&
PP.getIdentifierInfo("__is_pod")->getTokenID()
More information about the cfe-commits
mailing list