summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/if-empty-body.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Generalize -Wempty-body: warn when statement body is empty (closes: PR11329)Dmitri Gribenko2012-02-141-35/+0
| | | | | | | | | | | | | | * if, switch, range-based for: warn if semicolon is on the same line. * for, while: warn if semicolon is on the same line and either next statement is compound statement or next statement has more indentation. Replacing the semicolon with {} or moving the semicolon to the next line will always silence the warning. Tests from SemaCXX/if-empty-body.cpp merged into SemaCXX/warn-empty-body.cpp. llvm-svn: 150515
* Don't warn for empty 'if' body if there is a macro that expands to nothing, e.g:Argyrios Kyrtzidis2010-11-191-0/+35
if (condition) CALL(0); // empty macro but don't warn for empty body. Fixes rdar://8436021. llvm-svn: 119838
OpenPOWER on IntegriCloud