summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker
Commit message (Collapse)AuthorAgeFilesLines
...
* Like for symbolic region, automatically create a element zero region for Zhongxing Xu2010-02-081-15/+5
| | | | | | alloca region. llvm-svn: 95539
* Unify the implementation of getLValueElement of store managers.Zhongxing Xu2010-02-084-118/+55
| | | | | | | It's more sophisticated than the original one of BasicStore. But it does matter. llvm-svn: 95536
* Unify the implementation of getLValueIvar and getLValueField of store managers.Zhongxing Xu2010-02-084-122/+36
| | | | llvm-svn: 95535
* Move common methods to the base StoreManager class.Zhongxing Xu2010-02-083-57/+0
| | | | llvm-svn: 95534
* ASTContext is now a reference member of StoreManager.Zhongxing Xu2010-02-082-3/+3
| | | | llvm-svn: 95531
* Add support for binding and retrieving VarRegions in flat store.Zhongxing Xu2010-02-081-12/+61
| | | | llvm-svn: 95529
* Also teach RegionStore::RetrieveVar() to handle 'static' pointers that are ↵Ted Kremenek2010-02-061-1/+3
| | | | | | implicitly initialized to NULL. llvm-svn: 95479
* Fix regression in RegionStore (from BasicStore) where static variables were ↵Ted Kremenek2010-02-061-3/+15
| | | | | | not treated as being implicitly initialized to 0 (and instead were getting symbolicated). llvm-svn: 95478
* Teach RegionStore::InvalidateRegions() to also invalidate static variables ↵Ted Kremenek2010-02-062-5/+6
| | | | | | referenced by blocks. llvm-svn: 95459
* More GRState* -> Store changes.Zhongxing Xu2010-02-054-23/+15
| | | | llvm-svn: 95365
* Remove unused parameter.Zhongxing Xu2010-02-052-5/+3
| | | | llvm-svn: 95364
* More GRState* -> Store changes.Zhongxing Xu2010-02-054-14/+9
| | | | llvm-svn: 95362
* More GRState* -> Store changes.Zhongxing Xu2010-02-055-173/+144
| | | | llvm-svn: 95360
* More GRState* -> Store changes.Zhongxing Xu2010-02-053-37/+32
| | | | llvm-svn: 95357
* Change LazyCompoundVal to a <Store, MemRegion*> pair. We really don't need toZhongxing Xu2010-02-053-55/+54
| | | | | | spread GRState* everywhere. llvm-svn: 95354
* Cast evaluation no longer touch GRState.Zhongxing Xu2010-02-045-44/+27
| | | | llvm-svn: 95290
* Specially handle casts to 'void' in AdjustedReturnValueChecker.Ted Kremenek2010-02-041-2/+9
| | | | llvm-svn: 95287
* Remove stray typo.Ted Kremenek2010-02-041-1/+1
| | | | llvm-svn: 95286
* Now that CastRetrievedVal returns SVal, there is no need to use CastResult.Zhongxing Xu2010-02-043-45/+27
| | | | llvm-svn: 95279
* static analyzer: handle casts of a function to a function pointer withTed Kremenek2010-02-044-1/+94
| | | | | | | | a different return type. While we don't emit any errors (yet), at least we avoid cases where we might crash because of an assertion failure later on (when the return type differs from what is expected). llvm-svn: 95268
* Add FlatStore.cpp (from r95214) to CMake build. Don't forget about it! =DChandler Carruth2010-02-031-0/+1
| | | | llvm-svn: 95215
* Add skeleton of flat store manager.Zhongxing Xu2010-02-031-0/+154
| | | | llvm-svn: 95214
* Fix regression in RegionStore due to recent changes inTed Kremenek2010-02-031-84/+90
| | | | | | | | | RegionStoreManager::InvalidateRegions() by adjusting the worklist to iterate over BindingKeys instead of MemRegions. We also only need to do the actual invalidation work on base regions, and for non-base regions just blow away their bindings. llvm-svn: 95200
* Rework RegionStoreManager's implementation of InvalidateRegions() toTed Kremenek2010-02-031-214/+249
| | | | | | | | | | | | | | | | | | | | | not build a subregion map and instead do a single scan of the store. This is done by building "region clusters" that represent the collection of regions that have the same base region. Invalidating any region in a cluster means that they all should get invalidated. This change brought out a point that Zhongxing mentioned to me offline: the flattened memory binding has issues distinguishing between direct and default bindings. For example, setting the default value for an entire struct is the same as binding to the first element. To address this problem, I moved the binding "tag" (Direct or Default) from BindingVal to BdingKey (and removed BindingVal entirely). This requires us to do double lookups in some cases; and there is still much more cleanup that can be done. This change produced a noticeable speedup when analyzing sqlite3 (a reduction of 4% in running time). llvm-svn: 95193
* Remove RegionStoreSubRegionMap::iterator and ↵Ted Kremenek2010-02-021-26/+28
| | | | | | RegionStoreSubRegionMap::begin_end(). This is a precursor to using DenseSet to represent region sets instead of ImmutableSet. llvm-svn: 95151
* Explicitly check for casts to double or complex types instead of possibly ↵Ted Kremenek2010-02-021-0/+6
| | | | | | asserting in SValuator. llvm-svn: 95128
* Fix bug in GRExprEngine::VisitSizeOfAlignOfExpr() where we do not addTed Kremenek2010-02-021-0/+2
| | | | | | | 'Pred' to 'Dst' for cases we currently don't handle. This fixes <rdar://problem/7593875>. llvm-svn: 95048
* Hoist diagnostic generation in ReturnStackAddressChecker into a separate ↵Ted Kremenek2010-02-021-58/+69
| | | | | | method. No functionality change. llvm-svn: 95037
* Move more naming conventions logic out of the retain/release checker to ↵Ted Kremenek2010-01-272-87/+77
| | | | | | CocoaConventions.h. llvm-svn: 94682
* Add missing call to Optional<...>.getValue() that was pointed out by Chandler.Ted Kremenek2010-01-271-1/+1
| | | | llvm-svn: 94678
* Use getTypeAlignInChars() for alignment in VisitSizeOfAlignOfExpr().Ken Dyck2010-01-271-1/+1
| | | | llvm-svn: 94677
* Remove unnecessary ASTContext* argument from isRefType().Ted Kremenek2010-01-271-5/+5
| | | | llvm-svn: 94665
* Update CMake build.Ted Kremenek2010-01-271-0/+1
| | | | llvm-svn: 94663
* Start pulling out pieces of the monolithic retain/release checker intoTed Kremenek2010-01-272-125/+134
| | | | | | | | | reusable and modular API pieces. Start by pulling the logic for deriving the Cocoa naming convention into a separate API, header, and source file. llvm-svn: 94662
* Teach RegionStore to handle initialization of incomplete arrays in ↵Ted Kremenek2010-01-261-11/+18
| | | | | | structures using a compound value. Fixes <rdar://problem/7515938>. llvm-svn: 94622
* Move 'LocalCheckers.h' to the 'Checkers' subdirectory.Ted Kremenek2010-01-2611-11/+11
| | | | llvm-svn: 94609
* Move 'include/Checkers/PathSensitive/Checkers' directory to 'include/Checkers'.Ted Kremenek2010-01-262-2/+2
| | | | llvm-svn: 94608
* Move BugReporter.h, PathDiagnostic.h, and BugType.h to ↵Ted Kremenek2010-01-2525-33/+33
| | | | | | 'include/Checker/BugReporter' llvm-svn: 94428
* Add missing file.Ted Kremenek2010-01-251-0/+21
| | | | llvm-svn: 94407
* Split libAnalysis into two libraries: libAnalysis and libChecker.Ted Kremenek2010-01-2563-0/+22572
(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