summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
...
* * Simplify codeZhongxing Xu2010-10-051-10/+10
| | | | | | * Fix dump() to make it consistent with the test case. llvm-svn: 115609
* Added support for base and member destructors in destructor.Marcin Swiderski2010-10-051-0/+62
| | | | llvm-svn: 115592
* Added support for C++ initializers in CFG.Marcin Swiderski2010-10-041-6/+34
| | | | llvm-svn: 115493
* Now the whether adding implicit dtors is controlled by cmd option.Zhongxing Xu2010-10-011-2/+0
| | | | llvm-svn: 115275
* The return value is never used.Zhongxing Xu2010-10-011-7/+8
| | | | llvm-svn: 115272
* Use default augument.Zhongxing Xu2010-10-011-3/+3
| | | | llvm-svn: 115271
* Simplify interface for addLocalScopeForStmt().Zhongxing Xu2010-10-011-9/+9
| | | | llvm-svn: 115270
* The old logic would add non-struct and non C++ struct variables to the localZhongxing Xu2010-10-011-7/+6
| | | | | | | scope. Now we only add C++ struct with non-trivial destructor variables to the local scope. llvm-svn: 115269
* Added generating CFGAutomaticObjDtors for exception variable in catch statement.Marcin Swiderski2010-10-011-0/+12
| | | | llvm-svn: 115266
* Added generating CFGAutomaticObjDtors for init statement, condition variable ↵Marcin Swiderski2010-10-011-3/+26
| | | | | | and implicit scope in for statement. llvm-svn: 115265
* dded generating CFGAutomaticObjDtors for condition variable and implicit ↵Marcin Swiderski2010-10-011-0/+18
| | | | | | scopes in switch statement. llvm-svn: 115264
* Added generating CFGAutomaticObjDtors for condition variable and implicit ↵Marcin Swiderski2010-10-011-1/+24
| | | | | | scopes in while and do statements. llvm-svn: 115262
* Added generating CFGAutomaticObjDtors for condition variable and implicit ↵Marcin Swiderski2010-10-011-0/+24
| | | | | | scopes in if statement. llvm-svn: 115256
* Fixed checking for trivial destructor in ↵Marcin Swiderski2010-10-011-3/+4
| | | | | | CFGBuilder::addLocalScopeForVarDecl. Checked type does not have to represent C++ class. llvm-svn: 115254
* Added:Marcin Swiderski2010-10-011-0/+10
| | | | | | | | - Adding LocalScope for CompoundStmt, - Adding CFGAutomaticObjDtors for end of scope, return, goto, break, continue, - Regression tests for above cases. llvm-svn: 115252
* Added methods for adding LocalScopes and CFGAutomaticObjDtors.Marcin Swiderski2010-09-301-0/+131
| | | | llvm-svn: 115237
* Added methods for inserting CFGAutomaticObjDtors to CFGBlocks,Marcin Swiderski2010-09-301-0/+37
| | | | | | Fixed some misspells in comments. llvm-svn: 115236
* Added:Marcin Swiderski2010-09-301-5/+36
| | | | | | | | | - post-increament, distance and bool conversion methods to LocalScope::const_iterator, - adding VarDecl to LocalScope. Fixed some misspells in comments. llvm-svn: 115227
* Added two new command line arguments:Marcin Swiderski2010-09-301-1/+6
| | | | | | | -cfg-add-implicit-dtors - sets CFG::BuildOptions::AddImplicitDtors for AnalysisCosumer to true, -cfg-add-initializers - sets CFG::BuildOptions::AddInitializers for AnalysisCosumer to true. llvm-svn: 115142
* In preparation for adding generation of destructors for objects with ↵Marcin Swiderski2010-09-251-43/+166
| | | | | | | | | | automatic storage added: - LocalScope class with iterator used to pointing into it, - fat doxygen comment for LocalScope indended usage, - BlockScopePosPair class used for storing jump targets/sources (for: goto, break, continue), that replaces raw CFGBlock pointer used earlier for this purpose. llvm-svn: 114790
* Added:Marcin Swiderski2010-09-211-47/+109
| | | | | | | | - definitions of interfaces for CFGInitializer and CFGAutomaticObjDtor, - support for above classes to print_elem function (renamed print_stmt), - support for VarDecls in StmtPrinterHelper. llvm-svn: 114403
* 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-163-19/+38
| | | | | | 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-142-21/+17
| | | | | | parameter. Patch by Marcin Świderski! llvm-svn: 113898
* Fix CFGBuilder crash reported in PR 8141.Ted Kremenek2010-09-141-2/+6
| | | | llvm-svn: 113826
* Revert "CMake: Update to use standard CMake dependency tracking facilities ↵Michael J. Spencer2010-09-131-13/+4
| | | | | | | | | | | | | instead" This reverts commit r113631 Conflicts: CMakeLists.txt lib/CodeGen/CMakeLists.txt llvm-svn: 113817
* 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
* CMake: Update to use standard CMake dependency tracking facilities insteadMichael J. Spencer2010-09-101-4/+13
| | | | | | of whatever we were using before... llvm-svn: 113631
* Add ObjCAtSynchronizedStmt to the CFG and add GRExprEngine support (PreVisit ↵Ted Kremenek2010-09-101-0/+4
| | | | | | for checkers). llvm-svn: 113572
* Clean up CMake dependenciesDouglas Gregor2010-09-091-0/+2
| | | | llvm-svn: 113489
* Remove stray ';' and convert tabs to spaces.Ted Kremenek2010-09-091-5/+5
| | | | llvm-svn: 113466
* Enhance -Wunreachable-code to not consider the 'default:' branch of a switch ↵Ted Kremenek2010-09-091-5/+11
| | | | | | | | statement live if a switch on an enum value has explicit 'case:' statements for each enum value. llvm-svn: 113451
* 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
* Delete the relaxedLiveness object in the dtor of AnalysisContext.Ted Kremenek2010-08-281-0/+1
| | | | llvm-svn: 112380
* 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
* Add alternate version of LiveVariables analysis that does not kill liveness ↵Tom Care2010-08-272-6/+22
| | | | | | | | | at assignments. This 'relaxed' liveness is useful in path sensitive analysis for situations where the resulting extended liveness allows us to find some bugs. - Added killAtAssign flag to LiveVariables - Added relaxed LiveVariables to AnalysisContext with an accessor llvm-svn: 112306
* Add missing null checks in PseudoConstantAnalysisTom Care2010-08-251-1/+4
| | | | llvm-svn: 112100
* Improved the handling of blocks and block variables in PseudoConstantAnalysisTom Care2010-08-251-30/+47
| | | | | | | | | | - Removed the assumption that __block vars are all non-constant - Simplified some repetitive code in RunAnalysis - Added block walking support - Code/comments cleanup - Separated out test for block pseudoconstants llvm-svn: 112098
* GCC didn't care for my attempt at API compatibility, so brute-force everythingJohn McCall2010-08-255-30/+30
| | | | | | to the new constants. llvm-svn: 112047
* Fix printf format string checking for '%lc' (which expects a wint_t or ↵Ted Kremenek2010-08-242-0/+29
| | | | | | compatible argument). Fixes PR 7981. llvm-svn: 111978
* Improvements to IdempotentOperationChecker and its use of PseudoConstantAnalysisTom Care2010-08-241-8/+53
| | | | | | | | | | | | - Added wasReferenced function to PseudoConstantAnalysis to determine if a variable was ever referenced in a function (outside of a self-assignment) - BlockDeclRefExpr referenced variables are now explicitly added to the non-constant list - Remove unnecessary ignore of implicit casts - Generalized parameter self-assign detection to detect deliberate self-assigns of variables to avoid unused variable warnings - Updated test cases with deliberate self-assignments - Fixed bug with C++ references and pseudoconstants - Added test case for C++ references and pseudoconstants llvm-svn: 111965
* Several small changes to PseudoConstantAnalysis and the way ↵Tom Care2010-08-233-14/+68
| | | | | | | | | | | | IdempotentOperationChecker uses it. - Psuedo -> Pseudo (doh...) - C++ reference support - Added pseudoconstant test case for __block vars - Separated out static local checking from pseudoconstant analysis and generalized to non-local checking - Added missing test cases for storage false positives llvm-svn: 111832
* Detabify.Eli Friedman2010-08-221-1/+1
| | | | llvm-svn: 111768
OpenPOWER on IntegriCloud