summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/misc-ps-region-store.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Use a more robust check for null in CallAndMessageChecker.Jordan Rose2012-08-041-4/+4
| | | | | | This should fix the failing test on the buildbot as well. llvm-svn: 161290
* [analyzer] Add a simple check for initializing reference variables with null.Jordan Rose2012-08-021-1/+15
| | | | | | | | | There's still more work to be done here; this doesn't catch reference parameters or return values. But it's a step in the right direction. Part of <rdar://problem/11212286>. llvm-svn: 161214
* Implement initial static analysis inlining support for C++ methods.Ted Kremenek2012-06-221-0/+20
| | | | llvm-svn: 159047
* Teach the analyzer about CXXScaleValueInitExpr.Ted Kremenek2012-05-081-0/+14
| | | | llvm-svn: 156369
* Handle symbolicating a reference in an initializer expression that we don't ↵Ted Kremenek2012-04-051-0/+10
| | | | | | understand. llvm-svn: 154084
* Fix static analyzer crash on code taking the address of a field. Fixes PR ↵Ted Kremenek2012-03-221-0/+16
| | | | | | 11146. llvm-svn: 153283
* Fix analyzer crash on analyzing 'catch' with no condition variable.Ted Kremenek2012-03-161-0/+23
| | | | llvm-svn: 152900
* [analyzer] fix regression in analyzer of NOT actually aborting on Stmts it ↵Ted Kremenek2012-03-101-2/+25
| | | | | | | | | | | doesn't understand. We registered as aborted, but didn't treat such cases as sinks in the ExplodedGraph. Along the way, add basic support for CXXCatchStmt, expanding the set of code we actually analyze (hopefully correctly). Fixes: <rdar://problem/10892489> llvm-svn: 152468
* Fix typo.Ted Kremenek2011-12-011-1/+1
| | | | llvm-svn: 145577
* When analyzing a C++ method (without a specific caller), assume 'this' is ↵Ted Kremenek2011-12-011-0/+14
| | | | | | non-null. Fixes <rdar://problem/10508787>. llvm-svn: 145575
* Relax RegionStore to allow loads from CodeTextRegions. Apparently you can ↵Ted Kremenek2011-11-291-0/+8
| | | | | | actually write code that does this. This seems worthy of a checker, but the StoreManager should handle the memory abstraction without crashing. Fixes PR 11450. llvm-svn: 145424
* Fixed crash with initializer lists and unnamed bitfields in the RegionStoreJim Goodnow II2011-11-161-0/+17
| | | | | | | Manager. Added test to ensure proper binding of initialized values. This patch fixes PR11249. llvm-svn: 144831
* Fix crash when analyzing C++ code involving constant enums and switch ↵Ted Kremenek2011-09-301-0/+26
| | | | | | statements (<rdar://problem/10202899>). llvm-svn: 140844
* [analyzer] teach ExprEngine about loads from static C++ class fields. Fixes ↵Ted Kremenek2011-08-161-0/+27
| | | | | | <rdar://problem/9948787>. llvm-svn: 137760
* [analyzer] rename all experimental checker packages to have 'experimental' ↵Ted Kremenek2011-08-031-2/+2
| | | | | | be the common root package. llvm-svn: 136835
* Teach RegionStore not to symbolic array values whose indices it cannot ↵Ted Kremenek2011-05-191-0/+19
| | | | | | reason about. llvm-svn: 131702
* static analyzer: invalidate by-ref arguments passed to constructors in a ↵Ted Kremenek2011-04-121-0/+16
| | | | | | 'new' expression. llvm-svn: 129349
* Fix bug in SimpleSValBuilder where '--' pointer arithmetic was treated like ↵Ted Kremenek2011-04-121-0/+19
| | | | | | '++' pointer arithmetic. llvm-svn: 129348
* RegionStoreManager::invalidateRegions: treat classes the same as structs.Ted Kremenek2011-04-121-0/+14
| | | | llvm-svn: 129333
* Teach GRState::getSValAsScalarOrLoc() about C++ references.Ted Kremenek2011-04-121-0/+10
| | | | llvm-svn: 129329
* C++ static analysis: also invalidate fields of objects that are the callees ↵Ted Kremenek2011-04-111-0/+33
| | | | | | in C++ method calls. llvm-svn: 129308
* Start overhauling static analyzer support for C++ constructors. The ↵Ted Kremenek2011-04-081-0/+25
| | | | | | | | | inlining support isn't complete, and needs to be reworked to model CallEnter/CallExit (just like all other calls). For now, treat constructors mostly like other function calls, making the analysis of C++ code just a little more useful. llvm-svn: 129166
* Static analyzer: fix bug in handling of dynamic_cast<>. The sink node ↵Ted Kremenek2011-03-311-0/+14
| | | | | | | | wouldn't always be the final node, thus causing the state to continue propagating. Instead, recover some path-sensitivity by conjuring a symbol. llvm-svn: 128612
* Teach static analyzer about the basics of handling new[]. We still don't ↵Ted Kremenek2011-03-311-0/+8
| | | | | | simulate constructors, but at least the analyzer doesn't think the return value is uninitialized. llvm-svn: 128611
* Begin reworking static analyzer support for C++ method calls. The current ↵Ted Kremenek2011-03-301-0/+16
| | | | | | | | | | | logic was divorced from how we process ordinary function calls, had a tremendous about of redundancy, and relied strictly on inlining behavior (which was incomplete) to provide semantics instead of falling back to the conservative analysis we use for C functions. This is a significant step into making C++ analyzer support more useful. llvm-svn: 128557
* [analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best ↵Argyrios Kyrtzidis2011-02-281-2/+2
| | | | | | misnomer award. llvm-svn: 126676
* [analyzer] Migrate NSErrorChecker and DereferenceChecker to CheckerV2.Argyrios Kyrtzidis2011-02-281-2/+2
| | | | | | | | They cooperate in that NSErrorChecker listens for ImplicitNullDerefEvent events that DereferenceChecker can dispatch. ImplicitNullDerefEvent is when we dereferenced a location that may be null. llvm-svn: 126659
* [analyzer] Remove '-analyzer-experimental-internal-checks' flag, it doesn't ↵Argyrios Kyrtzidis2011-02-241-2/+2
| | | | | | have any checkers associated with it anymore. llvm-svn: 126440
* Handle 'UsingDirective' in CFGRecStmtDeclVisitor.Ted Kremenek2011-02-141-0/+15
| | | | llvm-svn: 125491
* If the unary operator is prefix and an lvalue (in C++), bindZhongxing Xu2010-12-221-1/+0
| | | | | | the location (l-value) to it. llvm-svn: 122396
* Start migration of static analyzer to using theTed Kremenek2010-12-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit lvalue-to-rvalue casts that John McCall recently introduced. This causes a whole bunch of logic in the analyzer for handling lvalues to vanish. It does, however, raise a few issues in the analyzer w.r.t to modeling various constructs (e.g., field accesses to compound literals). The .c/.m analysis test cases that fail are due to a missing lvalue-to-rvalue cast that will get introduced into the AST. The .cpp failures were more than I could investigate in one go, and the patch was already getting huge. I have XFAILED some of these tests, and they should obviously be further investigated. Some highlights of this patch include: - CFG no longer requires an lvalue bit for CFGElements - StackFrameContext doesn't need an 'asLValue' flag - The "VisitLValue" path from GRExprEngine has been eliminated. Besides the test case failures (XFAILed), there are surely other bugs that are fallout from this change. llvm-svn: 121960
* Fix PR8419. Reviewed by kremenek and xuzhongxing.Zhanyong Wan2010-11-221-0/+19
| | | | llvm-svn: 119960
* Make Clang static analyzer skip function template definitions. This fixes ↵Zhanyong Wan2010-10-311-0/+47
| | | | | | Clang PR 8426, 8427, & 8433. Reviewed by Ted Kremenek and Doug Gregor. llvm-svn: 117853
* Explicitly handle CXXOperatorCallExpr when building CFGs. We should treat ↵Ted Kremenek2010-08-311-0/+11
| | | | | | | it the same as CallExprs. Fixes: <rdar://problem/8375510> [Boost] CFGBuilder crash in Boost.Graph llvm-svn: 112618
* Teach GRExprEngine::VisitLValue() about FloatingLiteral, ImaginaryLiteral, ↵Ted Kremenek2010-07-291-0/+16
| | | | | | and CharacterLiteral. Fixes an assertion failure reported in PR 7675. llvm-svn: 109719
* Rename -cc1 option '-checker-cfref' to '-analyzer-check-objc-mem'.Ted Kremenek2010-02-051-2/+2
| | | | llvm-svn: 95348
* Make static analysis support for C++ 'this' expression context-sensitive. ↵Ted Kremenek2010-01-051-0/+43
| | | | | | Essentially treat 'this' as a implicit parameter to the method call, and associate a region with it. llvm-svn: 92675
* Add analyzer test case for 'ForStmt' with condition variable.Ted Kremenek2009-12-241-0/+14
| | | | llvm-svn: 92120
* CFG tweak: in a WhileStmt, the condition variable initializer is evaluated ↵Ted Kremenek2009-12-241-9/+10
| | | | | | 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/+15
| | | | | | a WhileStmt. llvm-svn: 92106
* Teach GRExprEngine to handle the initialization of the condition variable of ↵Ted Kremenek2009-12-241-0/+18
| | | | | | a SwitchStmt. llvm-svn: 92102
* Add CFG support for the condition variable that can appear in IfStmts in C++ ↵Ted Kremenek2009-12-231-0/+7
| | | | | | | | mode. Add transfer function support in GRExprEngine for IfStmts with initialized condition variables. llvm-svn: 91987
* Also treat the type of the subexpression as a pointer in ↵Ted Kremenek2009-12-231-0/+11
| | | | | | GRExprEngine::VisitCast when the expression is handled as an lvalue. llvm-svn: 91969
* Add basic support for analyzing CastExprs as lvalues.Ted Kremenek2009-12-231-0/+11
| | | | llvm-svn: 91952
* Use the FunctionDecl's result type to know exactly if it returns a reference.Zhongxing Xu2009-12-191-2/+1
| | | | llvm-svn: 91751
* Enhance GRExprEngine::VisitCallExpr() to be used in an lvalue context. ↵Ted Kremenek2009-12-181-1/+7
| | | | | | Uncovered a new failing test case along the way, but we're making progress on handling C++ references in the analyzer. llvm-svn: 91710
* Add failing test case for C++ static analysis.Ted Kremenek2009-12-171-0/+9
llvm-svn: 91578
OpenPOWER on IntegriCloud