summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker/GRState.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Refactoring: lib/Checker -> lib/GR and libclangChecker -> ↵Argyrios Kyrtzidis2010-12-221-550/+0
| | | | | | libclangGRCore llvm-svn: 122421
* [analyzer] Refactoring: include/clang/Checker -> include/clang/GRArgyrios Kyrtzidis2010-12-221-4/+4
| | | | llvm-svn: 122420
* Mark SVal constructors 'explicit'.Ted Kremenek2010-12-051-1/+1
| | | | llvm-svn: 120970
* Merge ValueManager into SValBuilder.Ted Kremenek2010-12-021-14/+15
| | | | llvm-svn: 120696
* Rename all 'AssumeXXX' methods in libCheckerTed Kremenek2010-12-011-2/+2
| | | | | | to 'assumeXXX'. llvm-svn: 120614
* Rename all 'EvalXXX' methods in libChecker toTed Kremenek2010-12-011-7/+7
| | | | | | 'evalXXX'. llvm-svn: 120609
* Rename 'SValuator' to 'SValBuilder'. The new nameTed Kremenek2010-12-011-2/+2
| | | | | | reflects what the class actually does. llvm-svn: 120605
* Adjust method calls to reflect name changes inTed Kremenek2010-11-241-4/+4
| | | | | | | | | | ImmutableSet/ImmtuableMap/ImmutableList APIs. Along the way, clean up some method names in the static analyzer so that they are more descriptive and/or start with lowercase letters. llvm-svn: 120071
* Rename GRState::getSVal() -> getRawSVal() and getSimplifiedSVal() -> getSVal().Ted Kremenek2010-09-091-3/+3
| | | | | | | | | | | | | | | | | The end result is now we eagarly constant-fold symbols in the analyzer that are perfectly constrained to be a constant value. This allows us to recover some path-sensitivity in some cases by lowering the required level of reasoning power needed to evaluate some expressions. The net win from this change is that the false positive in PR 8015 is fixed, and we also find more idempotent operations bugs. We do, however, regress with the BugReporterVisitors, which need to be modified to understand this constant folding (and look past it). This causes some diagnostic regressions in plist-output.m which will get addressed in a future patch. plist-output.m is now marked XFAIL, while plist-output-alternate.m now tests that the plist output is working, but with the suboptimal diagnostics. This second test file will eventually be removed. llvm-svn: 113477
* Add optional record of "location" SVals in the environment. When we ↵Ted Kremenek2010-09-031-3/+43
| | | | | | analyzing loads/stores, we lose the location SVal, which makes it difficult to recover in some cases (e.g., for post diagnostics). This is prep for pending changes to GRExprEngine. llvm-svn: 112930
* Add GRState::getSimplifiedSVal(), which provides an API hook for doing ↵Ted Kremenek2010-09-031-0/+36
| | | | | | | | symbol -> constant folding. This isn't used yet, but is prep for some pending optimizations in GRExprEngine. llvm-svn: 112929
* GCC didn't care for my attempt at API compatibility, so brute-force everythingJohn McCall2010-08-251-3/+3
| | | | | | to the new constants. llvm-svn: 112047
* Move GRState::AssumeInBound out of its header file -- it's not really ↵Jordy Rose2010-08-161-0/+44
| | | | | | inline-friendly anymore. llvm-svn: 111179
* Move GRState's bind* methods out of its header file -- they're too big for ↵Jordy Rose2010-08-151-0/+73
| | | | | | inlining now. llvm-svn: 111113
* StoreManager::RemoveDeadBindings() can take a Store instead of an entire ↵Zhongxing Xu2010-08-151-4/+4
| | | | | | GRState now. llvm-svn: 111103
* MemRegion can refer to ASTContext without external help.Zhongxing Xu2010-08-111-1/+1
| | | | llvm-svn: 110784
* Tweak GRState::unbindLoc to use makeWithStore, and make sure it's only ↵Jordy Rose2010-08-051-3/+3
| | | | | | called for non-region locations. llvm-svn: 110310
* Change arg type.Zhongxing Xu2010-07-231-1/+1
| | | | llvm-svn: 109218
* Make a bunch of new data structures for the new analysisZhongxing Xu2010-07-221-0/+11
| | | | | | | engine of the new translation unit. State marshal is there but no real work is done. End nodes are passed back. llvm-svn: 109105
* Remove the now-unused GRState::isEqual method. Instead of asking if an ↵Jordy Rose2010-07-061-25/+0
| | | | | | expression equals a certain value, use SValuator::EvalEQ and GRState::Assume to see if it can, must, or must not equal that value. llvm-svn: 107638
* Add an ivar to SymbolReaper for the current statement, and then stop passing ↵Jordy Rose2010-07-011-3/+3
| | | | | | the current statement around everywhere. Preparation for symbolic extents. llvm-svn: 107422
* Remove extents of dead symbolic regions when RemoveDeadBindings.Zhongxing Xu2010-05-261-4/+3
| | | | | | This requires creating new persistent states due to the nature of GDM. llvm-svn: 104668
* Checker: random include cleanup.Benjamin Kramer2010-03-271-1/+1
| | | | llvm-svn: 99731
* Add methods to remove a GDM entry.Zhongxing Xu2010-03-251-0/+12
| | | | | | Instead of setting the ReturnExpr GDM to NULL, remove it. llvm-svn: 99470
* Mark CXXThisRegion in the current or parent stack frame context as live so thatZhongxing Xu2010-03-171-1/+2
| | | | | | their bindings are not removed. llvm-svn: 98705
* Remove reference to AnalysisContext in Environment. We already have ↵Zhongxing Xu2010-03-051-14/+6
| | | | | | | | LocationContext information in ExplodedNode. llvm-svn: 97785
* When profiling Environment, also profile with AnalysisContext*, bacauseZhongxing Xu2010-03-041-0/+6
| | | | | | | | | | we now may have identical states with different analysis context. Set the right AnalysisContext in state when entering and leaving a callee. With both of the above changes, we can pass the test case. llvm-svn: 97724
* Revert 95541.Ted Kremenek2010-02-081-4/+4
| | | | llvm-svn: 95545
* Rename: GRState::getSVal(Stmt*) => getExprVal(),Zhongxing Xu2010-02-081-4/+4
| | | | | | GRState::getSVal(MemRegion*) => Load(). llvm-svn: 95541
* More GRState* -> Store changes.Zhongxing Xu2010-02-051-1/+2
| | | | llvm-svn: 95365
* More GRState* -> Store changes.Zhongxing Xu2010-02-051-1/+2
| | | | llvm-svn: 95362
* Split libAnalysis into two libraries: libAnalysis and libChecker.Ted Kremenek2010-01-251-0/+358
(1) libAnalysis is a generic analysis library that can be used by Sema. It defines the CFG, basic dataflow analysis primitives, and inexpensive flow-sensitive analyses (e.g. LiveVariables). (2) libChecker contains the guts of the static analyzer, incuding the path-sensitive analysis engine and domain-specific checks. Now any clients that want to use the frontend to build their own tools don't need to link in the entire static analyzer. This change exposes various obvious cleanups that can be made to the layout of files and headers in libChecker. More changes pending. :) This change also exposed a layering violation between AnalysisContext and MemRegion. BlockInvocationContext shouldn't explicitly know about BlockDataRegions. For now I've removed the BlockDataRegion* from BlockInvocationContext (removing context-sensitivity; although this wasn't used yet). We need to have a better way to extend BlockInvocationContext (and any LocationContext) to add context-sensitivty. llvm-svn: 94406
OpenPOWER on IntegriCloud