diff options
| author | Ted Kremenek <kremenek@apple.com> | 2014-03-29 00:35:20 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2014-03-29 00:35:20 +0000 |
| commit | e1f53884e483c92c497eab5f12f479c136f6ba94 (patch) | |
| tree | ab006dbc9f76246f5ffea87564c9da3c28743ff2 /lib/CodeGen/CodeGenFunction.cpp | |
| parent | ed699a2323ef722d56fa89e6ffcdcfe62308b56d (diff) | |
| download | clang-e1f53884e483c92c497eab5f12f479c136f6ba94.tar.gz clang-e1f53884e483c92c497eab5f12f479c136f6ba94.tar.bz2 clang-e1f53884e483c92c497eab5f12f479c136f6ba94.tar.xz | |
Improve -Wunreachable-code to provide a means to indicate code is intentionally marked dead via if((0)).
Taking a hint from -Wparentheses, use an extra '()' as a sigil that
a dead condition is intentionally dead. For example:
if ((0)) { dead }
When this sigil is found, do not emit a dead code warning. When the
analysis sees:
if (0)
it suggests inserting '()' as a Fix-It.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205069 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions
