[cfe-commits] r119838 - in /cfe/trunk: include/clang/AST/Stmt.h include/clang/Lex/Preprocessor.h include/clang/Parse/Parser.h include/clang/Sema/Sema.h lib/AST/Stmt.cpp lib/Lex/PPMacroExpansion.cpp lib/Parse/ParseStmt.cpp lib/Sema/SemaStmt.cpp lib/Sema/TreeTransform.h lib/Serialization/ASTReaderStmt.cpp lib/Serialization/ASTWriterStmt.cpp test/Sema/if-empty-body.c test/SemaCXX/if-empty-body.cpp

Abramo Bagnara abramo.bagnara at gmail.com
Fri Nov 19 14:30:05 PST 2010


Il 19/11/2010 21:54, Argyrios Kyrtzidis ha scritto:
> Author: akirtzidis
> Date: Fri Nov 19 14:54:25 2010
> New Revision: 119838
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=119838&view=rev
> Log:
> Don't warn for empty 'if' body if there is a macro that expands to nothing, e.g:
> 
>   if (condition)
>     CALL(0); // empty macro but don't warn for empty body.

Is not this approach way too much ad hoc, is it?

What about loop body, else stmt and who knows how many places we might
be interested...

Is not better to have the flag in NullStmt or to use another way to
detect this situation?




More information about the cfe-commits mailing list