diff options
| author | Douglas Gregor <dgregor@apple.com> | 2008-12-10 23:01:14 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2008-12-10 23:01:14 +0000 |
| commit | caaf29a08761b14fbe42a29080c22dd6961056d1 (patch) | |
| tree | 459e8a607cb7e3c59241f527a28d52bc84db5007 /lib/CodeGen/CGExpr.cpp | |
| parent | bc76dd06eb881c70c9775b74bab8b88cd747f173 (diff) | |
| download | clang-caaf29a08761b14fbe42a29080c22dd6961056d1.tar.gz clang-caaf29a08761b14fbe42a29080c22dd6961056d1.tar.bz2 clang-caaf29a08761b14fbe42a29080c22dd6961056d1.tar.xz | |
Added a warning when referencing an if's condition variable in the
"else" clause, e.g.,
if (int X = foo()) {
} else {
if (X) { // warning: X is always zero in this context
}
}
Fixes rdar://6425550 and lets me think about something other than
DeclContext.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60858 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
0 files changed, 0 insertions, 0 deletions
