Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Generalize -Wempty-body: warn when statement body is empty (closes: PR11329) | Dmitri Gribenko | 2012-02-14 | 1 | -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 Kyrtzidis | 2010-11-19 | 1 | -0/+35 |
if (condition) CALL(0); // empty macro but don't warn for empty body. Fixes rdar://8436021. llvm-svn: 119838 |