[PATCH] Ignore contents of #if 0 blocks.
    Alexander Kornienko 
    alexfh at google.com
       
    Thu May 23 16:11:05 PDT 2013
    
    
  
================
Comment at: lib/Format/UnwrappedLineParser.h:236
@@ +235,3 @@
+    PP_If0, // #if 0
+    PP_Else // #else
+  };
----------------
Daniel Jasper wrote:
> Why do we need to know whether we are in an #else?
We can't just ignore #else to handle #if 0 .. #else <some code> #endif case. We can use PP_If to represent #else for this case, but it's misleading. And I'd prefer to have a closer model of the language syntax, if it comes at no cost. And we can also detect errors like #if ... #else .... #else. However I have no idea what to do with them ;)
http://llvm-reviews.chandlerc.com/D855
    
    
More information about the cfe-commits
mailing list