- Sep 20, 2011
-
-
Anna Zaks authored
llvm-svn: 140180
-
Anna Zaks authored
[analyzer] Refactor PathDiagnosticLocation: Use PointerUnion of LocationContext and AnalysisContext to support creation of PathDiagnosticLocations for checkers which no context sensitivity. llvm-svn: 140162
-
Anna Zaks authored
llvm-svn: 140147
-
Anna Zaks authored
llvm-svn: 140146
-
Anna Zaks authored
[analyzer] Refactor PathDiagnosticLocation: Pre-compute Range and Location with gen methods on object creation instead of computing on demand. This would allow to remove dependency on the other members which help with construction and might not even be valid at later stages (to be removed later on). llvm-svn: 140131
-
Anna Zaks authored
llvm-svn: 140130
-
Anna Zaks authored
llvm-svn: 140100
-
- Sep 19, 2011
-
-
Argyrios Kyrtzidis authored
It already works (and is useful with) macro locs as well. llvm-svn: 140057
-
- Sep 16, 2011
-
-
Anna Zaks authored
[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of SourceLocations (commit 5 of ?): - Get rid of PathDiagnosticLocation(SourceRange r,..) constructor by providing a bunch of create methods. - The PathDiagnosticLocation(SourceLocation L,..), which is used by crate methods, will eventually become private. - Test difference is in the case when the report starts at the beginning of the function. We used to represent that point as a range of the very first token in the first statement. Now, it's just a single location representing the first character of the first statement. llvm-svn: 139932
-
- Sep 15, 2011
-
-
Anna Zaks authored
[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of SourceLocations (commit 4 of ?): - The closing brace is always a single location, not a range. - The test case previously had a location key 57:1 followed by a range [57:1 - 57:1]. llvm-svn: 139832
-
Anna Zaks authored
[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of SourceLocations (commit 2 of ?): - Fix a fixme and move the logic of creating a PathDiagnosticLocation corresponding to a ProgramPoint into a PathDiagnosticLocation constructor. - Rename PathDiagnosticLocation::create to differentiate from the added constructor. llvm-svn: 139825
-
Anna Zaks authored
[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of SourceLocations (commit 2 of ?): - Modify all PathDiagnosticLocation constructors that take Stmt to also requre LocationContext. - Add a constructor which should be used in case there is no valid statement/location (it will grab the location of the enclosing function). llvm-svn: 139763
-
- Sep 14, 2011
-
-
Anna Zaks authored
[analyzer] After CFG has been linearized, we can have a situation where an ExpoledNode has an invalid SourceLocation (which has no correspondence in the source code). This commit is the first step to solve this problem. - It adds LocationContext to the PathDiagnosticLocation object and uses it to lookup the enclosing statement with a valid location. - So far, the LocationContext is only available when the object is constructed from the ExplodedNode. - Already found some subtle bugs(in plist-output-alternate.m) where the intermediate diagnostic steps were not previously shown. llvm-svn: 139703
-
Anna Zaks authored
[analyzer] Refactor: Make PathDiagnosticLocation responsible for creating a valid object given an ExploadedNode (the same logic can be reused by other checkers). llvm-svn: 139672
-
- Sep 13, 2011
-
-
Douglas Gregor authored
language options. Use that .def file to declare the LangOptions class and initialize all of its members, eliminating a source of annoying initialization bugs. AST serialization changes are next up. llvm-svn: 139605
-
- Sep 12, 2011
-
-
-
Anna Zaks authored
[analyzer] Fix a new failure encountered while building Adium exposed as a result of r138196(radar://10087620). ObjectiveC property of type int has a value of type ObjCPropRef, which is a Loc. llvm-svn: 139507
-
- Sep 10, 2011
-
-
John McCall authored
llvm-svn: 139466
-
John McCall authored
the lifetime of the block by copying it to the heap, or else we'll get a dangling reference because the code working with the non-block-typed object will not know it needs to copy. There is some danger here, e.g. with assigning a block literal to an unsafe variable, but, well, it's an unsafe variable. llvm-svn: 139451
-
Anna Zaks authored
[analyzer] -analyze-function for ObjectiveC should check if any of the methods match the name (not only the first one). llvm-svn: 139439
-
- Sep 09, 2011
-
-
John McCall authored
than conversions of C pointers to ObjC pointers. In order to ensure that we've caught every case, add asserts to CastExpr that strictly determine which cast kind is used for which kind of bit cast. llvm-svn: 139352
-
- Sep 03, 2011
-
-
Benjamin Kramer authored
llvm-svn: 139078
-
- Sep 02, 2011
-
-
Jordy Rose authored
And with that, TransferFuncs is gone! llvm-svn: 139003
-
Jordy Rose authored
[analyzer] Move RetainReleaseChecker to the Checkers library and rename it to RetainCountChecker...and clean up the file while I'm at it. llvm-svn: 139002
-
Jordy Rose authored
[analyzer] Remove lingering CFRefCount creation, which would have resulted in a leak. There's room for improvement here... llvm-svn: 139000
-
Jordy Rose authored
llvm-svn: 138999
-
Jordy Rose authored
[analyzer] Move the knowledge of whether or not GC is enabled for the current analysis from CFRefCount to ExprEngine. Remove TransferFuncs from ExprEngine and AnalysisConsumer. Demote RetainReleaseChecker to a regular checker, and give it the name osx.cocoa.RetainCount (class name change coming shortly). Update tests accordingly. llvm-svn: 138998
-
Douglas Gregor authored
builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). llvm-svn: 138985
-
- Sep 01, 2011
-
-
Zhongxing Xu authored
free() is returned by realloc(). Most code expect NULL. And we only need to transfer one final ProgramState. llvm-svn: 138937
-
- Aug 31, 2011
-
-
Jordy Rose authored
llvm-svn: 138875
-
- Aug 29, 2011
-
-
Anna Zaks authored
[analyzer] MacOSKeychainAPIChecker: Simplify getSymbolForRegion by using existing API. Thanks Jordy. llvm-svn: 138765
-
Anna Zaks authored
Fix: Bug 10798 - [analyzer] Crash when analyzing ICU. (A slight improvement on the previous commit.) llvm-svn: 138762
-
Anna Zaks authored
Patch by Jean-Daniel Dupas. Thanks for spotting and fixing! llvm-svn: 138757
-
- Aug 28, 2011
-
-
Jordy Rose authored
[analyzer] Introduce a new callback for checkers, printState, to be used for debug-printing the contents of a ProgramState. Unlike the other callbacks, this one is a simple virtual method, since it is only to be used for debugging. This new callback replaces the old ProgramState::Printer interface, and allows us to move the printing of refcount bindings from CFRefCount to RetainReleaseChecker. llvm-svn: 138728
-
Jordy Rose authored
[analyzer] Remove the ProgramState argument from ExprEngine::evalBind; we were ignoring it anyway. No functionality change. llvm-svn: 138720
-
Jordy Rose authored
llvm-svn: 138719
-
Jordy Rose authored
This is a common path for function and C++ method calls, Objective-C messages and property accesses, and C++ construct-exprs. As support, add message receiver accessors to ObjCMessage and CallOrObjCMessage. llvm-svn: 138718
-
Jordy Rose authored
[analyzer] Change the check::RegionChanges callback to include the regions explicitly requested for invalidation. Also, allow CallOrObjCMessage to wrap a CXXConstructExpr as well. Finally, this allows us to remove the clunky whitelisting system from CFRefCount/RetainReleaseChecker. Slight regression due to CXXNewExprs not yet being handled in post-statement callbacks (PR forthcoming). llvm-svn: 138716
-
- Aug 27, 2011
-
-
Ted Kremenek authored
[analyzer] Rename current PathDiagnosticClient::HandlePathDiagnostic() to HandlePathDiagnosticImpl(), and slot in new HandlePathDiagnostic() for potentially handling concurrent access to PathDiagnosticClients (in the future). llvm-svn: 138713
-
Ted Kremenek authored
[analyzer] Pull body of loop in AnalysisConsumer::HandleDeclContext() into its own method. No real functionality change. llvm-svn: 138712
-