From: Douglas Gregor Date: Sat, 30 Jul 2011 07:08:19 +0000 (+0000) Subject: Fix a thinko in my __is_empty/__is_pod commit. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a14ecbdecd89801d87beae92ad60845374e252a;p=clang Fix a thinko in my __is_empty/__is_pod commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136561 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp index 58ba42e49a..7046c5f2fd 100644 --- a/lib/Lex/PPMacroExpansion.cpp +++ b/lib/Lex/PPMacroExpansion.cpp @@ -640,12 +640,16 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) { .Case("is_class", LangOpts.CPlusPlus) .Case("is_convertible_to", LangOpts.CPlusPlus) .Case("is_empty", - LangOpts.CPlusPlus && II->getTokenID() != tok::identifier) + LangOpts.CPlusPlus && + PP.getIdentifierInfo("__is_empty")->getTokenID() + != tok::identifier) .Case("is_enum", LangOpts.CPlusPlus) .Case("is_literal", LangOpts.CPlusPlus) .Case("is_standard_layout", LangOpts.CPlusPlus) .Case("is_pod", - LangOpts.CPlusPlus && II->getTokenID() != tok::identifier) + LangOpts.CPlusPlus && + PP.getIdentifierInfo("__is_pod")->getTokenID() + != tok::identifier) .Case("is_polymorphic", LangOpts.CPlusPlus) .Case("is_trivial", LangOpts.CPlusPlus) .Case("is_trivially_copyable", LangOpts.CPlusPlus)