- Jan 29, 2009
-
-
Ted Kremenek authored
retain/release checker: When generating summaries for CF/CG functions, allow arguments to "escape" if they are passed to a function containing the terms "InsertValue", "SetValue", or "AddValue". This fixes <rdar://problem/6539791>. llvm-svn: 63341
-
Chris Lattner authored
redundant #includes. Patch by Anders Johnsen! llvm-svn: 63271
-
- Jan 28, 2009
-
-
Ted Kremenek authored
llvm-svn: 63250
-
Ted Kremenek authored
llvm-svn: 63249
-
Ted Kremenek authored
retain/release checker: Always generate an "autorelease" summary for an "autorelease" message, and have the summary processing logic treat it as a no-op in GC mode. This change is motivated to encode more of the semantics in the summaries themselves for eventual better diagnostics. llvm-svn: 63241
-
Ted Kremenek authored
retain/release checker: Improve diagnostics to indicate that CF objects are not automatically garbage collected. llvm-svn: 63187
-
Ted Kremenek authored
retain/release checker: Indicate whether a tracked object is a Core Foundation or Objective-C object. llvm-svn: 63186
-
Ted Kremenek authored
llvm-svn: 63184
-
Ted Kremenek authored
retain/release checker: Embed an "object type" into the RetEffect/RetVal objects to help distinguish between Objective-C and Core Foundation objects (for better diagnostics). llvm-svn: 63183
-
Ted Kremenek authored
llvm-svn: 63181
-
Ted Kremenek authored
llvm-svn: 63180
-
Ted Kremenek authored
llvm-svn: 63179
-
Ted Kremenek authored
llvm-svn: 63178
-
Ted Kremenek authored
llvm-svn: 63177
-
Ted Kremenek authored
llvm-svn: 63176
-
- Jan 27, 2009
-
-
Chris Lattner authored
.def file for each library. This means that adding a diagnostic to sema doesn't require all the other libraries to be rebuilt. Patch by Anders Johnsen! llvm-svn: 63111
-
Ted Kremenek authored
Fix bug in BasicStore::getLValueElement where if the base of an array subscript expression was an ElementRegion we stacked another ElementRegion on top of that. This fixes PR 3422. llvm-svn: 63110
-
Chris Lattner authored
as reported to the user and as manipulated by #line. This is what __FILE__, __INCLUDE_LEVEL__, diagnostics and other things should follow (but not dependency generation!). This patch also includes several cleanups along the way: - SourceLocation now has a dump method, and several other places that did similar things now use it. - I cleaned up some code in AnalysisConsumer, but it should probably be simplified further now that NamedDecl is better. - TextDiagnosticPrinter is now simplified and cleaned up a bit. This patch is a prerequisite for #line, but does not actually provide any #line functionality. llvm-svn: 63098
-
Ted Kremenek authored
- Add the distinction between the 'bug type' and the 'bug description' HTMLDiagnostics: - Output the bug type field as HTML comments scan-build: - Use the bug type field instead of the bug description for the HTML table. - Radar filing now automatically picks up the bug description in the title (addresses <rdar://problem/6265970>) llvm-svn: 63084
-
- Jan 26, 2009
-
-
Sebastian Redl authored
llvm-svn: 63031
-
Ted Kremenek authored
Use tag classes instead of typedefs for GDM entries 'ConstNotEq' and 'ConstEq'. This avoids collisions in the GDM. llvm-svn: 63002
-
- Jan 25, 2009
-
-
Eli Friedman authored
accurately states what the function is trying to do and how it is different from Expr::isEvaluatable. Also get rid of a parameter that is both unused and inaccurate. llvm-svn: 62951
-
- Jan 24, 2009
-
-
Ted Kremenek authored
Fix crash ElementRegion::getRValueType() when the RvalueType of the ArrayRegion is a typedef and not (directly) a pointer. llvm-svn: 62909
-
Ted Kremenek authored
More hacking on static analyzer diagnostics. When emitting summary diagnostics the code paths for diagnostics involving paths or single locations are now unified. This patch also constifies many arguments/methods that are touched by this logic, leading to a nice overall code cleanup. llvm-svn: 62903
-
- Jan 23, 2009
-
-
Ted Kremenek authored
llvm-svn: 62885
-
Ted Kremenek authored
Added virtual method DiagnosticClient::IncludeInDiagnosticCounts(). This is used by Diagnostics to determine if a diagnostic sent to a given DiagnosticClient should be included in the count of diagnostics. The default implementation of this method returns 'true'. Implemented DiagCollector::IncludeInDiagnosticCounts() to return 'false' so that the batching of diagnostics for use with BugReporter doesn't mess up the count of real diagnostics. llvm-svn: 62873
-
Zhongxing Xu authored
llvm-svn: 62847
-
Zhongxing Xu authored
llvm-svn: 62846
-
Zhongxing Xu authored
region. Otherwise we would get an extra level of pointer type. llvm-svn: 62844
-
Ted Kremenek authored
For now, return UnknownVal() in RegionStore::getElementsSize() for AnonTypedRegions. It wasn't really doing the right thing and was crashing on rdar-6442306-1.m. This fix causes all path-sensitive test cases to pass with RegionStore. llvm-svn: 62816
-
Ted Kremenek authored
Add RegionStore support for the implicit object region that 'self' references. This causes tests 'ObjCProperties.m' and 'refcnt_naming.m' to now pass with RegionStore. llvm-svn: 62814
-
- Jan 22, 2009
-
-
Ted Kremenek authored
Fix RegionStore::getLValueElement() to handle the case when the base region is not an ElementRegion (also do some cleanups of its core logic). This gets array-struct.c to work with RegionStore. llvm-svn: 62781
-
Ted Kremenek authored
SymbolReaper::isLive(SymbolRef) now always returns true for SymbolRegionRvalues because these represent the symbolic values for parameters/globals upon entry to the function. These values are always ;live' because they represent constraints on the context of how the function was called. This will be useful for both summary generation but is also necessary to get RegionStore's lazy-binding of locations to symbols to work in practice with RemoveDeadBindings. llvm-svn: 62771
-
Ted Kremenek authored
their associated APIs. We no longer need separate SymbolData objects for fields, variables, etc. Instead, we now associated symbols with the "rvalue" of a MemRegion (i.e., the value stored at that region). Now we only have two kinds of SymbolData objects: SymbolRegionRValue and SymbolConjured. This cleanup also makes the distinction between a SymbolicRegion and a symbolic value that is a location much clearer. A SymbolicRegion represents a chunk of symbolic memory, while a symbolic location is just a "pointer" with different possible values. Without any specific knowledge, a symbolic location resolves (i.e., via a dereference) to a SymbolicRegion. In the future, when we do better alias reasoning, a symbolic location can become an alias for another location, thus merging the constraints on the referred SymbolicRegion with the other region. llvm-svn: 62769
-
- Jan 21, 2009
-
-
Ted Kremenek authored
llvm-svn: 62727
-
Ted Kremenek authored
Static Analyzer: Replace LiveSymbols/DeadSymbols sets with a new object called "SymbolReaper". Right now it just consolidates the two and cleans up some client code, but shortly it will be used to enable "lazy computation" of live symbols for use with RegionStore. llvm-svn: 62722
-
Ted Kremenek authored
Because the RegionStore can reason about values beyond the reasoning power of BasicStore, this patch splits some of the test cases for the retain/release checker to have versions that are handled by RegionStore (more warnings) and BasicStore (less warnings). llvm-svn: 62667
-
- Jan 20, 2009
-
-
Douglas Gregor authored
that every declaration lives inside a DeclContext. Moved several things that don't have names but were ScopedDecls (and, therefore, NamedDecls) to inherit from Decl rather than NamedDecl, including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't store empty DeclarationNames for these things, nor do we try to insert them into DeclContext's lookup structure. The serialization tests are temporarily disabled. We'll re-enable them once we've sorted out the remaining ownership/serialiazation issues between DeclContexts and TranslationUnion, DeclGroups, etc. llvm-svn: 62562
-
rdar://problem/6506065Ted Kremenek authored
Dead stores checker: Fix <rdar://problem/6506065> by being more selective when say that a store is dead even though the computed value is used in the enclosing expression. llvm-svn: 62552
-
- Jan 17, 2009
-
-
Ted Kremenek authored
Fix analyzer crash found when scanning Wine sources where the analyzer used old logic to determine the value of a switch 'case' label. llvm-svn: 62395
-