summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* BugReporter (extensive diagnostics): Ignore parentheses when added control-flowTed Kremenek2009-04-231-0/+16
| | | | | | pieces for location contexts. llvm-svn: 69895
* Eliminate the three SmallVectors in ObjCImplDecl (for instanceDouglas Gregor2009-04-233-14/+15
| | | | | | | | | | | methods, class methods, and property implementations) and instead place all of these entities into the DeclContext. This eliminates more linear walks when looking for class or instance methods and should make PCH (de-)serialization of ObjCDecls trivial (and lazy). llvm-svn: 69849
* Add PathDiagnosticRange to PathDiagnostics. These simply wrap SourceRange andTed Kremenek2009-04-221-2/+3
| | | | | | | indicate whether or not the range represents an absolute range or should be extended by lexing to the end of the token. llvm-svn: 69834
* BugReporter (extensive diagnostics): Use correct location for location contexts.Ted Kremenek2009-04-221-1/+1
| | | | llvm-svn: 69824
* BugReporter (extensive diagnostics): always add an edge if there is no locationTed Kremenek2009-04-221-1/+8
| | | | | | context. llvm-svn: 69823
* BugReporter (extensive diagnostics):Ted Kremenek2009-04-221-3/+2
| | | | | | | | - Remove stale assertion that was breaking the test suite. - When popping location contexts, only add a control-flow piece for fileID locations. llvm-svn: 69814
* BugReporter (extensive diagnostic algorithm): The initial control-flow edge nowTed Kremenek2009-04-221-2/+16
| | | | | | starts from the first character of the first statement. llvm-svn: 69813
* PathDiagnosticLocation: ranges for terminators now only include the firstTed Kremenek2009-04-221-1/+22
| | | | | | | | character instead of the entire range for the IfStmt, ForStmt, etc. We may gradually refine these ranges later, but basically terminator ranges just refer to the first keyword. llvm-svn: 69812
* Fix crash reported in PR 3991. The analyzer doesn't reason about ObjCKVCExpr.Ted Kremenek2009-04-211-0/+1
| | | | llvm-svn: 69754
* This patch is largely due to Zhongxing Xu. I've simply applied it because ofTed Kremenek2009-04-211-11/+31
| | | | | | | | some refactoring I did recently to StoreManager. StoreManager::CastRegion: Handle casts to void* by stripping TypedViewRegions. llvm-svn: 69751
* Fix: <rdar://problem/6777209> false Dereference of null pointer in loop: ↵Ted Kremenek2009-04-211-1/+25
| | | | | | | | | | pointer increment/decrement preserves non-nullness When the StoreManager doesn't reason well about pointer-arithmetic, propagate the non-nullness constraint on a pointer value when performing pointer arithmetic uisng ++/--. llvm-svn: 69741
* Tweak pretty-printing of constraints.Ted Kremenek2009-04-211-1/+1
| | | | llvm-svn: 69740
* Refactor 'BasicStoreManager::CastRegion' and 'RegionStoreManager::CastRegion'Ted Kremenek2009-04-213-63/+50
| | | | | | | | into StoreManager::CastRegion. Both methods were practically identical, and this is core logic that is common to all StoreManagers since it defines the basic invariants of the abstract memory model. llvm-svn: 69730
* Recommit 69694 but this time also include the header changes (sorry for breakingTed Kremenek2009-04-211-0/+10
| | | | | | the build). llvm-svn: 69702
* Revert 69694 (use of undefined getSymbol)Daniel Dunbar2009-04-211-10/+0
| | | | llvm-svn: 69697
* Add pretty-printing for CodeTextRegions.Ted Kremenek2009-04-211-0/+10
| | | | llvm-svn: 69694
* Lexically order the implementation of MemRegion 'print' methods. No ↵Ted Kremenek2009-04-211-18/+18
| | | | | | functionality change. llvm-svn: 69688
* Use 'getAs<CodeTextRegion>' instead of 'dyn_cast<CodeTextRegion>' to handle anyTed Kremenek2009-04-211-1/+1
| | | | | | layered regions. llvm-svn: 69686
* Remove loc::FuncVal.Zhongxing Xu2009-04-205-23/+0
| | | | llvm-svn: 69577
* get a CodeTextRegion when visiting FunctionDecl reference.Zhongxing Xu2009-04-205-32/+44
| | | | | | get FunctionDecl with more general utility method. llvm-svn: 69570
* As we now have ValueManager as the new value factory, we do not need factoryZhongxing Xu2009-04-201-1/+1
| | | | | | methods of SVal. llvm-svn: 69565
* FunctionDecl::getBody() is getting an ASTContext argument for use inDouglas Gregor2009-04-186-10/+16
| | | | | | | | lazy PCH deserialization. Propagate that argument wherever it needs to be. No functionality change, except that I've tightened up a few PCH tests in preparation. llvm-svn: 69406
* Add analyzer support for objc_atomicCompareAndSwap()Ted Kremenek2009-04-111-2/+3
| | | | llvm-svn: 68849
* Implement analyzer support for OSCompareAndSwap. This required pushing "tagged"Ted Kremenek2009-04-115-24/+237
| | | | | | | | | ProgramPoints all the way through to GRCoreEngine. NSString.m now fails with RegionStoreManager because of the void** cast. Disabling use of region store for that test for now. llvm-svn: 68845
* Move a few more NonLoc static functions to ValueManager.Ted Kremenek2009-04-102-13/+13
| | | | llvm-svn: 68800
* Add prototype for CodeTextRegion.Zhongxing Xu2009-04-102-0/+72
| | | | | | | | A CodeTextRegion wraps two kinds of data: FunctionDecl* or SymbolRef. The latter comes from the symbolic function pointer that are generated from function calls or input data. llvm-svn: 68777
* Finally nuke loc::SymbolVal.Zhongxing Xu2009-04-106-170/+14
| | | | llvm-svn: 68771
* Fix: <rdar://problem/6776949> Branch condition evaluates to an uninitialized ↵Ted Kremenek2009-04-101-1/+25
| | | | | | | | value (argc is guaranteed to be >= 1) The analyzer now adds the precondition that the first argument of 'main' is > 0. llvm-svn: 68757
* Implement attribute "analyzer_noreturn" (<rdar://problem/6777003>). This allowsTed Kremenek2009-04-101-1/+1
| | | | | | | clients of the analyzer to designate custom assertion routines as "noreturn" functions from the analyzer's perspective but not the compiler's. llvm-svn: 68746
* - Move ownership of MemRegionManager into ValueManager.Ted Kremenek2009-04-096-48/+31
| | | | | | | - Pull SVal::GetConjuredSymbol() and friends into ValueManager. This greatly simplifies the calling interface to clients. llvm-svn: 68731
* Propagate the ASTContext to various AST traversal and lookup functions.Douglas Gregor2009-04-093-6/+8
| | | | | | No functionality change (really). llvm-svn: 68726
* Remove SVal::MakeZero and replace it with ValueManager::makeZeroVal.Ted Kremenek2009-04-092-2/+3
| | | | llvm-svn: 68711
* analyzer: Introduce a new class, ValueManager, that serves as an aggregateTed Kremenek2009-04-092-17/+13
| | | | | | | | | | | "manager of symbolic values", wrapping BasicValueFactory, SymbolManager, and MemRegionManager. While these individual managers nicely separate functionality in the analyzer, constructing symbolic values can sometimes be cumbersome because it requires using multiple managers at once. The goal of this class is to create some factory methods to create SVals that require the use of these different managers, thus (hopefully) simplifying the analyzer API for clients. llvm-svn: 68709
* stop using loc::SymbolVal and clean up code with new API.Zhongxing Xu2009-04-092-34/+21
| | | | llvm-svn: 68703
* clean up code with new API.Zhongxing Xu2009-04-091-4/+2
| | | | llvm-svn: 68701
* clean up code with new API.Zhongxing Xu2009-04-091-4/+2
| | | | llvm-svn: 68700
* clean up code with new API.Zhongxing Xu2009-04-091-4/+2
| | | | llvm-svn: 68699
* clean up code with new API.Zhongxing Xu2009-04-091-8/+2
| | | | llvm-svn: 68698
* stop using loc::SymbolVal.Zhongxing Xu2009-04-091-2/+3
| | | | llvm-svn: 68697
* stop using loc::SymbolVal.Zhongxing Xu2009-04-091-1/+3
| | | | llvm-svn: 68696
* stop using loc::SymbolVal.Zhongxing Xu2009-04-091-2/+4
| | | | llvm-svn: 68695
* clean up code with new API.Zhongxing Xu2009-04-091-6/+2
| | | | llvm-svn: 68694
* clean up code with new API.Zhongxing Xu2009-04-091-21/+5
| | | | llvm-svn: 68693
* Add a new method because sometimes the type of the conjured symbol is not theZhongxing Xu2009-04-092-1/+14
| | | | | | type of the expression where we create the symbol. llvm-svn: 68692
* make a conjured symbol as the original code.Zhongxing Xu2009-04-091-2/+2
| | | | llvm-svn: 68691
* clean up code with new API.Zhongxing Xu2009-04-091-8/+4
| | | | llvm-svn: 68687
* Fix a null pointer dereference error due to state caching in a loop involvingTed Kremenek2009-04-091-7/+6
| | | | | | sending a message to a nil receiver. llvm-svn: 68686
* Create a symbolic region instead of a loc::SymbolVal. This is a continued stepZhongxing Xu2009-04-092-14/+12
| | | | | | to eliminate the use of loc::SymbolVal. llvm-svn: 68685
* GRExprEngine: Don't try to reason about the size of 'void' for the return typeTed Kremenek2009-04-091-33/+38
| | | | | | of messages sent to nil. llvm-svn: 68683
* Fix another regression introduced by changes to the analyzer's reasoning aboutTed Kremenek2009-04-091-11/+12
| | | | | | nil receivers in message expressions. llvm-svn: 68672
OpenPOWER on IntegriCloud