summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/warn-for-var-in-else.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove the warning for variables declared in the if-expression being used inNick Lewycky2010-08-051-45/+0
| | | | | | | | the else clause. The problem is that it's overly zealous and will respond to uses in assignments, or after assignments. We should bring this back once we can do it right. Fixes PR7100. llvm-svn: 110314
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Eliminate some false positives due to a thinko in the "'blah' isDouglas Gregor2009-11-051-0/+14
| | | | | | | always zero in this context" warning logic. Also, make the diagnostic itself more precise when referring to pointer values ("NULL" vs. "zero"). llvm-svn: 86143
* Prep for new warning.Mike Stump2009-07-221-0/+1
| | | | llvm-svn: 76709
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Added a warning when referencing an if's condition variable in theDouglas Gregor2008-12-101-0/+30
"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
OpenPOWER on IntegriCloud