summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CFG.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Tidy up.Zhongxing Xu2010-09-161-5/+4
| | | | llvm-svn: 114062
* Introduce new CFGElement hierarchy to support C++ CFG, based on Marcin's patchZhongxing Xu2010-09-161-6/+18
| | | | | | and discussions with Ted and Jordy. llvm-svn: 114056
* Relax assertion in CFG builder when processing ForStmts. This fixes an ↵Ted Kremenek2010-09-151-1/+2
| | | | | | | | assertion failure on code containing GNU statement expressions reported in PR 8141. llvm-svn: 113953
* Add CFG::BuildOptions class to pass in CFG builder options under on ↵Ted Kremenek2010-09-141-18/+10
| | | | | | parameter. Patch by Marcin Świderski! llvm-svn: 113898
* Fix CFGBuilder crash reported in PR 8141.Ted Kremenek2010-09-141-2/+6
| | | | llvm-svn: 113826
* Remove from the CFG the half-implemented support for scoping information. ↵Ted Kremenek2010-09-131-42/+4
| | | | | | | | We decided that scope information doesn't belong in the CFG at all, since it is a lexical construct. Patch by Marcin Świderski! llvm-svn: 113798
* Add ObjCAtSynchronizedStmt to the CFG and add GRExprEngine support (PreVisit ↵Ted Kremenek2010-09-101-0/+4
| | | | | | for checkers). llvm-svn: 113572
* Remove stray ';' and convert tabs to spaces.Ted Kremenek2010-09-091-5/+5
| | | | llvm-svn: 113466
* Add 'filtered_pred_iterator' and 'filtered_succ_iterator' to CFGBlock. This ↵Ted Kremenek2010-09-091-0/+23
| | | | | | | | | allows a client to selectively walk successors/predecessors based on commonly used filters. For starters, add a filter to ignore 'default:' cases for SwitchStmts when all enum values are covered by CaseStmts. llvm-svn: 113449
* FinishBlock() is essentially doing nothing except returning '!badCFG'.Zhongxing Xu2010-09-061-55/+42
| | | | llvm-svn: 113149
* Simplify CFG construction: bail out early when we have a bad CFG.Zhongxing Xu2010-09-061-36/+32
| | | | llvm-svn: 113148
* Improve CFG printing support for CXXOperatorCallExpr and CXXBindTemporaryExpr.Ted Kremenek2010-08-311-5/+15
| | | | llvm-svn: 112619
* Explicitly handle CXXOperatorCallExpr when building CFGs. We should treat ↵Ted Kremenek2010-08-311-1/+2
| | | | | | | it the same as CallExprs. Fixes: <rdar://problem/8375510> [Boost] CFGBuilder crash in Boost.Graph llvm-svn: 112618
* Revert my lame attempt at appeasing the CFGBuilderDouglas Gregor2010-08-311-7/+0
| | | | llvm-svn: 112580
* Teach the CFGBuilder not do die on CXXBindTemporaryExpr, ↵Douglas Gregor2010-08-311-0/+7
| | | | | | CXXOperatorCallExpr. Fixes a Boost.Graph crasher. llvm-svn: 112578
* Explicitly handle CXXExprWithTemporaries during CFG construction by just ↵Ted Kremenek2010-08-281-0/+6
| | | | | | visiting the subexpression. While we don't do anything intelligent right now, this obviates a bogus -Wunreahable-code warning reported in PR 6130. llvm-svn: 112334
* GCC didn't care for my attempt at API compatibility, so brute-force everythingJohn McCall2010-08-251-7/+7
| | | | | | to the new constants. llvm-svn: 112047
* Fix horrible CFG bug caused by a series of NullStmts appearing at the ↵Ted Kremenek2010-08-171-1/+4
| | | | | | | | beginning of a do...while loop. This would cause the body of the DoStmt to be disconnected from the preceding code. llvm-svn: 111283
* CFGBuilder: don't create the empty "loop back" block for DoStmts if the loop ↵Ted Kremenek2010-08-171-12/+16
| | | | | | edge can never be taken. llvm-svn: 111282
* Fix CFGBuilder to not blow out the stack when processing deeply nested ↵Ted Kremenek2010-08-041-5/+32
| | | | | | CaseStmts. Fixes <rdar://problem/8268753>. llvm-svn: 110286
* Add 'AnalysisContext::getUnoptimizedCFG()' to allow clients to get access to ↵Ted Kremenek2010-08-021-20/+33
| | | | | | | | the original CFG without any edges pruned out because of trivially solvable conditions (e.g., 'if (0)'). llvm-svn: 110085
* Make addStmt always add stmt. Delegate other cases to Visit() directly.Zhongxing Xu2010-06-031-6/+6
| | | | llvm-svn: 105384
* CFG: add all LHS of assingments as lvalue. This improves support for C++ ↵Zhongxing Xu2010-06-031-2/+15
| | | | | | reference. Patch by Jordy. llvm-svn: 105383
* Fix crash in CFG construction for 'break' statements appearing in statement ↵Ted Kremenek2010-05-211-7/+8
| | | | | | | | expressions within the increment code of a for loop. llvm-svn: 104375
* Don't add a null successor to a CFGBlock when the contents of an ↵Ted Kremenek2010-05-131-2/+1
| | | | | | | | @synchronized statement is empty. Fixes <rdar://problem/7979430>. llvm-svn: 103717
* Add null check in CFGBuilder::VisitStmt() to make CFG constructionTed Kremenek2010-04-301-0/+4
| | | | | | more resilient to bad code. llvm-svn: 102793
* Fix CFG crasher involving statement expressions reported in PR 6938.Ted Kremenek2010-04-291-2/+10
| | | | llvm-svn: 102576
* Use direct assignment instead of user defined conversion.Zhongxing Xu2010-04-141-3/+3
| | | | llvm-svn: 101236
* CFGBuilder: always add C++ member call expr as block-level expr.Zhongxing Xu2010-04-131-0/+13
| | | | llvm-svn: 101127
* Fix CFG bug where bases of member expressions were not always evaluated in a ↵Ted Kremenek2010-04-111-4/+24
| | | | | | lvalue context. Fixes <rdar://problem/7813989>. llvm-svn: 100966
* Fix bug in AddStmtChoice:asLValue() where 'AsLValueNotAlwaysAdd' would not ↵Ted Kremenek2010-04-111-1/+1
| | | | | | be treated as indicating an lvalue. llvm-svn: 100965
* Sort visitor methods. No functionality change.Ted Kremenek2010-04-111-5/+4
| | | | llvm-svn: 100964
* the big refactoring bits of PR3782.Rafael Espindola2010-03-301-1/+1
| | | | | | | | This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute and fix the bug. llvm-svn: 99920
* Be a bit more consistent in using operator->Rafael Espindola2010-03-291-1/+1
| | | | | | | This patch moves some methods from QualType to Type and changes the users to use -> instead of . llvm-svn: 99805
* Simplify code a bit and remove unneeded semicolons.Benjamin Kramer2010-03-031-7/+4
| | | | llvm-svn: 97654
* [CFG]Ted Kremenek2010-03-021-17/+17
| | | | | | | | | | | | | | | | | | | After discussion with Zhongxing, don't force the initializer of DeclStmts to be block-level expressions. This led to some interesting fallout: [UninitializedValues] Always visit the initializer of DeclStmts (do not assume they are block-level expressions). [BasicStore] With initializers of DeclStmts no longer block-level expressions, this causes self-referencing initializers (e.g. 'int x = x') to no longer cause the initialized variable to be live before the DeclStmt. While this is correct, it caused BasicStore::RemoveDeadBindings() to prune off the values of these variables from the initial store (where they are set to uninitialized). The fix is to back-port some (and only some) of the lazy-binding logic from RegionStore to BasicStore. Now the default values of local variables are determined lazily as opposed to explicitly initialized. llvm-svn: 97591
* Always add CallExpr as block-level expression. Inline-based interproceduralZhongxing Xu2010-02-241-1/+1
| | | | | | analysis needs this. llvm-svn: 97014
* Revert "Simplify code: Succ is guaranteed to be not NULL.", which turns out toDaniel Dunbar2010-02-221-28/+28
| | | | | | not be guaranteed. llvm-svn: 96782
* Simplify code: Succ is guaranteed to be not NULL.Zhongxing Xu2010-02-221-28/+28
| | | | llvm-svn: 96772
* Improve unreachable code warnings with respect to dead binary andMike Stump2010-01-211-1/+2
| | | | | | unary operators. llvm-svn: 94084
* Speed up compilation by avoiding generating exceptional edges fromMike Stump2010-01-211-9/+35
| | | | | | | | | | | | | CallExprs as those edges help cause a n^2 explosion in the number of destructor calls. Other consumers, such as static analysis, that would like to have more a more complete CFG can select the inclusion of those edges as CFG build time. This also fixes up the two compilation users of CFGs to be tolerant of having or not having those edges. All catch code is assumed be to live if we didn't generate the exceptional edges for CallExprs. llvm-svn: 94074
* Add infrastructure to add base initializers and member initializers toMike Stump2010-01-211-4/+12
| | | | | | the CFG. WIP. llvm-svn: 94062
* Wire up the EH context for the catch clauses to the outer EH context. WIP.Mike Stump2010-01-201-9/+9
| | | | llvm-svn: 93963
* Add an exceptional edge from the try terminated block to the outer EHMike Stump2010-01-201-2/+16
| | | | | | | | context (try or the Exit block) when there isn't a catch (...). Improve CFG printing for catch (...). llvm-svn: 93962
* Add CFG support for the start and end of scopes and infrastructure forMike Stump2010-01-191-18/+76
| | | | | | implicit destructor calls. WIP. llvm-svn: 93922
* Tighten code and rework indentation of some if() branches (for readability). ↵Ted Kremenek2010-01-191-16/+15
| | | | | | No functionality change. llvm-svn: 93904
* Remove extra space in uses of 'assert()'.Ted Kremenek2010-01-191-7/+7
| | | | llvm-svn: 93903
* Re-alphabetize cases in switch statement.Ted Kremenek2010-01-191-9/+9
| | | | llvm-svn: 93902
* Add try/catch CFG support. Also improve throw CFG support. WIP.Mike Stump2010-01-191-10/+100
| | | | llvm-svn: 93840
* Add CFG support for the initializer of the condition variable of a ForStmt.Ted Kremenek2009-12-241-0/+13
| | | | llvm-svn: 92113
OpenPOWER on IntegriCloud