summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Fix a serious bug: Tmp3 is the wrong destination set. We should create a newZhongxing Xu2010-01-191-6/+6
| | | | | | intermediate destination set Tmp4. llvm-svn: 93873
* Add try/catch CFG support. Also improve throw CFG support. WIP.Mike Stump2010-01-191-10/+100
| | | | llvm-svn: 93840
* Add support for computing size in elements for symbolic regions obtained fromZhongxing Xu2010-01-184-10/+36
| | | | | | malloc(). llvm-svn: 93722
* If the symbol has not been tracked, do not free it. This is possible when freeZhongxing Xu2010-01-181-1/+6
| | | | | | is called on a pointer that does not get its value directly from malloc. llvm-svn: 93706
* Don't suggest the developer use 'arc4random' instead of 'rand' when that ↵Ted Kremenek2010-01-151-3/+15
| | | | | | function is not available. Fixes PR 6012. llvm-svn: 93508
* Teach BugReporter to "escape" the occurance of '%' characters in diagnostic ↵Ted Kremenek2010-01-151-2/+17
| | | | | | messages when emitted results to the standard Diagnostics output. Fixes PR 6033. llvm-svn: 93507
* Convert a few more uses of std::string& to llvm::StringRef.Ted Kremenek2010-01-151-1/+1
| | | | llvm-svn: 93506
* Fix pr6035.Zhongxing Xu2010-01-141-0/+3
| | | | llvm-svn: 93422
* Add an unreachable code checker.Mike Stump2010-01-131-0/+4
| | | | llvm-svn: 93287
* Fix pasto.Benjamin Kramer2010-01-111-1/+1
| | | | llvm-svn: 93181
* Avoid use of deprecated functions (CStrInCStrNoCase and StringsEqualNoCase).Benjamin Kramer2010-01-111-12/+13
| | | | llvm-svn: 93175
* Roll out ASTContext::getTypeSizeInChars(), replacing instances ofKen Dyck2010-01-113-12/+16
| | | | | | | | | | "ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits ones as appropriate. Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType, fromQuantity(), and getQuantity() for clarity. llvm-svn: 93153
* Enhance ScanReachableSymbols::scan(). Now another OSAtomic test case passes.Zhongxing Xu2010-01-111-0/+3
| | | | | | The old test case has a little mistake. llvm-svn: 93148
* Enhance SVals::getAsRegion: get the region that is converted to an integer.Zhongxing Xu2010-01-111-0/+4
| | | | | | This with previous patch fixes a OSAtomic test case. llvm-svn: 93146
* Switch RegionStore over to using <BaseRegion+raw offset> to storeTed Kremenek2010-01-114-52/+92
| | | | | | | | | | | | | | value bindings. Along with a small change to OSAtomicChecker, this resolves <rdar://problem/7527292> and resolves some long-standing issues with how values can be bound to the same physical address by not have the same "key". This change is only a beginning; logically RegionStore needs to better handle loads from addresses where the stored value is larger/smaller/different type than the loaded value. We handle these cases in an approximate fashion now (via CastRetrievedVal and help in SimpleSValuator), but it could be made much smarter. llvm-svn: 93137
* Preliminary reworking of value-binding logic in RegionStore:Ted Kremenek2010-01-111-31/+110
| | | | | | | | | | | | | (1) Introduce a new 'BindingKey' class to match 'BindingValue'. This gives us the flexibility to change the current key value from 'const MemRegion*' to something more interesting. (2) Rework additions/removals/lookups from the store to use new 'Remove', 'Add', 'Lookup' utility methods. No "real" functionality change; just prep work and abstraction. llvm-svn: 93136
* Fix overzealous assertion in GRExprEngine::VisitLValue(). ATed Kremenek2010-01-091-7/+25
| | | | | | | | | CallExpr/ObjCMessageExpr can be visited in an "lvalue" context if it returns a struct temporary. Currently the analyzer doesn't reason about struct temporary returned by function calls, but we shouldn't crash here either. llvm-svn: 93081
* Fix broken diagnostic when returning the address of a stack-allocated array.Ted Kremenek2010-01-091-3/+11
| | | | llvm-svn: 93071
* When binding an rvalue to a reference, create a temporary object. Use Zhongxing Xu2010-01-093-6/+39
| | | | | | | | CXXObjectRegion to represent it. In Environment, lookup a literal expression before make up a value for it. llvm-svn: 93047
* Fix handling in GRExprEngine of 'default' branch in switch statementsTed Kremenek2010-01-081-5/+12
| | | | | | | | | when the default case is winnowed down to be infeasible. When all cases were ruled out (and the analysis state for the default case would be infeasible) we would still consider the default case possible. This fixes PR 5969. llvm-svn: 93017
* Revert r92318. Instead fix the analyzer: do not call Zhongxing Xu2010-01-051-2/+3
| | | | | | ASTContext::hasSameUnqualifiedType() when one of the type is VariableArrayType. llvm-svn: 92723
* Make static analysis support for C++ 'this' expression context-sensitive. ↵Ted Kremenek2010-01-054-30/+46
| | | | | | Essentially treat 'this' as a implicit parameter to the method call, and associate a region with it. llvm-svn: 92675
* Remove references to 'Checker' and 'GRTransferFuncs' fromTed Kremenek2010-01-055-59/+48
| | | | | | | | | | | | GRStateManager. Having these references was an abstraction violation, as they really should only be known about GRExprEngine. This change required adding a new 'ProcessAssume' callback in GRSubEngine. GRExprEngine implements this callback by calling 'EvalAssume' on all registered Checker objects as well as the registered GRTransferFunc object. llvm-svn: 92549
* Let constraint manager inform checkers that some assumption logic has happend.Zhongxing Xu2009-12-313-9/+54
| | | | | | | | | Add new states for symbolic regions tracked by malloc checker. This enables us to do malloc checking more accurately. See test case. Based on Lei Zhang's patch and discussion. llvm-svn: 92342
* Simplify code by using an equivalent template class.Zhongxing Xu2009-12-301-11/+2
| | | | llvm-svn: 92305
* Remove some dead variables clang-analyzer found.Benjamin Kramer2009-12-251-2/+0
| | | | llvm-svn: 92162
* Fix typo spotted by MSVC.Benjamin Kramer2009-12-251-2/+2
| | | | | | GRExprEngine.cpp(1348) : warning C4305: 'argument' : truncation from 'clang::ProgramPoint::Kind' to 'bool' llvm-svn: 92154
* As Ted suggested, record the callsite information with the StackFrameContext.Zhongxing Xu2009-12-242-17/+21
| | | | llvm-svn: 92121
* Enhance dataflow analyses to recognize branch statements in the CFG used as ↵Ted Kremenek2009-12-241-1/+13
| | | | | | hooks for the initialization of condition variables. llvm-svn: 92119
* Inter-procedural analysis: now we can return from the callee.Zhongxing Xu2009-12-241-0/+37
| | | | llvm-svn: 92116
* Teach GRExprEngine to handle the initialization of the condition variable of ↵Ted Kremenek2009-12-241-0/+6
| | | | | | a ForStmt. llvm-svn: 92114
* Add CFG support for the initializer of the condition variable of a ForStmt.Ted Kremenek2009-12-241-0/+13
| | | | llvm-svn: 92113
* CFG tweak: in a WhileStmt, the condition variable initializer is evaluated ↵Ted Kremenek2009-12-241-14/+13
| | | | | | every time the condition is checked. llvm-svn: 92111
* Teach GRExprEngine to handle the initialization of the condition variable of ↵Ted Kremenek2009-12-241-0/+6
| | | | | | a WhileStmt. llvm-svn: 92106
* Add CFG support for the initializer of the condition variable of a WhileStmt.Ted Kremenek2009-12-241-1/+14
| | | | llvm-svn: 92105
* Teach GRExprEngine to handle the initialization of the condition variable of ↵Ted Kremenek2009-12-241-7/+11
| | | | | | a SwitchStmt. llvm-svn: 92102
* Add CFG support for the initializer of the condition variable of a SwitchStmt.Ted Kremenek2009-12-241-2/+13
| | | | llvm-svn: 92101
* Tidy up FindSubExprAssignments to not deference the child_iterator multiple ↵Ted Kremenek2009-12-231-7/+10
| | | | | | times. llvm-svn: 92087
* move a few more symbols to .rodata/.data.rel.roNuno Lopes2009-12-231-1/+1
| | | | llvm-svn: 92012
* Migrate the call inliner to the Checker interface.Zhongxing Xu2009-12-231-29/+36
| | | | llvm-svn: 91991
* For inter-procedural analysis, predecessor node may be in another function.Zhongxing Xu2009-12-231-3/+3
| | | | | | So we should use the current program point. llvm-svn: 91989
* Add CFG support for the condition variable that can appear in IfStmts in C++ ↵Ted Kremenek2009-12-232-1/+50
| | | | | | | | mode. Add transfer function support in GRExprEngine for IfStmts with initialized condition variables. llvm-svn: 91987
* Suppress dead store warnings involving objects initialized with ↵Ted Kremenek2009-12-231-0/+4
| | | | | | CXXExprTemporaries. llvm-svn: 91986
* Add stack trace pretty printing in GRExprEngine::VisitLValue().Ted Kremenek2009-12-231-0/+4
| | | | llvm-svn: 91985
OpenPOWER on IntegriCloud