llvm-project/clang/lib/Analysis
Ted Kremenek e6ee671e16 Fix bad CFG construction bug when handling C++ 'try' statements.
This code assigned the last created CFGBlock* to the variable 'Block',
which is a scratch variable which is null'ed out after a block is
completed.  By assigning the last created block to 'Block', we start
editing a completed block, inserting CFGStmts that should be in
another block.  This was the case with 'try'.  The test case that
showed this had a while loop inside a 'try', and the logic before
the while loop was being included as part of the "condition block"
for the loop.  This showed up as a bogus dead store, but could
have lots of implications.

Turns out this bug was replicated a few times within CFG.cpp, so
I went and fixed up those as well.

llvm-svn: 167788
2012-11-13 00:12:13 +00:00
..
AnalysisDeclContext.cpp [analyzer] add LocationContext::inTopFrame() helper. 2012-11-03 02:54:16 +00:00
BodyFarm.cpp Conditionally use an integral cast for BodyFarm support for OSAtomicCompareAndSwap if the return type is not a boolean. 2012-10-12 00:18:19 +00:00
BodyFarm.h Implement faux-body-synthesis of well-known functions in the static analyzer when 2012-09-21 00:09:11 +00:00
CFG.cpp Fix bad CFG construction bug when handling C++ 'try' statements. 2012-11-13 00:12:13 +00:00
CFGReachabilityAnalysis.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00
CFGStmtMap.cpp Constify the result of CFGStmt::getStmt(). 2011-08-23 23:05:04 +00:00
CMakeLists.txt Implement faux-body-synthesis of well-known functions in the static analyzer when 2012-09-21 00:09:11 +00:00
CallGraph.cpp Remove unused private member variables found by clang's new -Wunused-private-field. 2012-06-06 17:32:50 +00:00
CocoaConventions.cpp Add missing cctype includes. 2012-08-10 10:58:18 +00:00
Dominators.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
FormatString.cpp Format strings: offer a fixit for Darwin's %D/%U/%O to ISO %d/%u/%o. 2012-09-13 02:11:15 +00:00
FormatStringParsing.h Support the 'a' length modifier in scanf format strings as a C90 2011-12-15 10:25:47 +00:00
LiveVariables.cpp [analyzer] Teach live variable analyzes that super uses self pointer. 2012-08-14 00:36:20 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
ObjCNoReturn.cpp clang/lib/Analysis/ObjCNoReturn.cpp: Fix [-Wnewline-eof] 2012-09-13 05:53:17 +00:00
PostOrderCFGView.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
PrintfFormatString.cpp Format strings: %D, %U, and %O are valid on Darwin (same as %d, %u, %o). 2012-09-13 02:11:03 +00:00
ProgramPoint.cpp [analyzer] Run remove dead bindings right before leaving a function. 2012-04-20 21:59:08 +00:00
PseudoConstantAnalysis.cpp Drop the ASTContext.h include from Stmt.h and fix up transitive users. 2012-07-04 17:04:04 +00:00
ReachableCode.cpp Dont cast away const needlessly. Found by gcc48 -Wcast-qual. 2012-09-06 15:59:27 +00:00
ScanfFormatString.cpp Format strings: %D, %U, and %O are valid on Darwin (same as %d, %u, %o). 2012-09-13 02:11:03 +00:00
ThreadSafety.cpp Thread-safety analysis: allow attributes on constructors to refer to 'this'. 2012-10-05 22:38:19 +00:00
UninitializedValues.cpp Avoid malloc thrashing in the uninitialized value analysis. 2012-09-28 16:44:29 +00:00