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

Abramo Bagnara abramo.bagnara at gmail.com
Mon Jan 2 02:08:27 PST 2012


Author: abramo
Date: Mon Jan  2 04:08:26 2012
New Revision: 147433

URL: http://llvm.org/viewvc/llvm-project?rev=147433&view=rev
Log:
Added a missing case for -Wdisabled-macro-expansion.

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=147433&r1=147432&r2=147433&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
+++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Mon Jan  2 04:08:26 2012
@@ -305,8 +305,10 @@
     // unexpandable.
     if (IdentifierInfo *NewII = Identifier.getIdentifierInfo()) {
       if (MacroInfo *NewMI = getMacroInfo(NewII))
-        if (!NewMI->isEnabled() || NewMI == MI)
+        if (!NewMI->isEnabled() || NewMI == MI) {
           Identifier.setFlag(Token::DisableExpand);
+          Diag(Identifier, diag::pp_disabled_macro_expansion);
+        }
     }
 
     // Since this is not an identifier token, it can't be macro expanded, so





More information about the cfe-commits mailing list