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 | 85970ca84cd6b3545b3b4a3ca5b6f7d87541ee38 (patch) | |
tree | 7e814814f679a0d4d23c66c028a0daa47e3b5804 /clang/lib/Lex/PPLexerChange.cpp | |
parent | 0864a75ebf82c239ab62bdc91ee2fd3b7279245f (diff) | |
download | bcm5719-llvm-85970ca84cd6b3545b3b4a3ca5b6f7d87541ee38.tar.gz bcm5719-llvm-85970ca84cd6b3545b3b4a3ca5b6f7d87541ee38.zip |
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.
llvm-svn: 60858
Diffstat (limited to 'clang/lib/Lex/PPLexerChange.cpp')
0 files changed, 0 insertions, 0 deletions