summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/uninit-sometimes.cpp
Commit message (Collapse)AuthorAgeFilesLines
* PR16054: Slight strengthening for -Wsometimes-uninitialized: if we use aRichard Smith2013-09-121-8/+50
| | | | | | | | | | | variable uninitialized every time we reach its (reachable) declaration, or every time we call the surrounding function, promote the warning from -Wmaybe-uninitialized to -Wsometimes-uninitialized. This is still slightly weaker than desired: we should, in general, warn if a use is uninitialized the first time it is evaluated. llvm-svn: 190623
* Use some heuristics so that when a fixit removes a source range, we tryArgyrios Kyrtzidis2012-12-201-2/+2
| | | | | | | | | | | | | | | | | | | | to also remove a trailing space if possible. For example, removing '__bridge' from: i = (__bridge I*)p; should result in: i = (I*)p; not: i = ( I*)p; rdar://11314821 llvm-svn: 170764
* PR13360: When deciding the earliest point which inevitably leads to anRichard Smith2012-07-131-7/+23
| | | | | | | uninitialized variable use, walk back over branches where we've reached all the non-null successors, not just cases where we've reached all successors. llvm-svn: 160206
* In response to some discussions on IRC, tweak the wording of the newRichard Smith2012-05-261-43/+156
| | | | | | | | | | | | | | | -Wsometimes-uninitialized diagnostics to make it clearer that the cause of the issue may be a condition which must always evaluate to true or false, rather than an uninitialized variable. To emphasize this, add a new note with a fixit which removes the impossible condition or replaces it with a constant. Also, downgrade the diagnostic from -Wsometimes-uninitialized to -Wconditional-uninitialized when it applies to a range-based for loop, since the condition is not written explicitly in the code in that case. llvm-svn: 157511
* Split a chunk of -Wconditional-uninitialized warnings out into a separate flag,Richard Smith2012-05-251-0/+258
-Wsometimes-uninitialized. This detects cases where an explicitly-written branch inevitably leads to an uninitialized variable use (so either the branch is dead code or there is an uninitialized use bug). This chunk of warnings tentatively lives within -Wuninitialized, in order to give it more visibility to existing Clang users. llvm-svn: 157458
OpenPOWER on IntegriCloud