Anna Zaks
fedf5dfc71
[analyzer] Warn about the use of insecure, deprecated vfork() function PR11053 ( http://llvm.org/bugs/show_bug.cgi?id=11053 ).
...
A patch by Graham Lee!
llvm-svn: 141643
2011-10-11 04:34:54 +00:00
Eli Friedman
df14b3a837
Initial implementation of __atomic_* (everything except __atomic_is_lock_free).
...
llvm-svn: 141632
2011-10-11 02:20:01 +00:00
Ted Kremenek
8f34b6999c
[analyzer] Teach the static analyzer about CXXForRangeStmt. Patch by Jim Goodnow II!
...
llvm-svn: 141587
2011-10-10 22:36:31 +00:00
Richard Smith
caf3390d44
Constant expression evaluation refactoring:
...
- Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions,
and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert
behaviour.
- Factor out evaluation of bitfield bit widths.
- Fix a few places which would evaluate an expression twice: once to determine
whether it is a constant expression, then again to get the value.
llvm-svn: 141561
2011-10-10 18:28:20 +00:00
Ted Kremenek
d79719b144
Provide basic static analyzer support for CXXTemporaryObjectExpr. Patch by Jim Goodnow II.
...
llvm-svn: 141433
2011-10-07 22:48:13 +00:00
Ted Kremenek
dccc2b2277
Remove AnalysisContext::getLiveVariables(), and introduce a templatized mechanism to lazily create analyses that are attached to AnalysisContext objects.
...
llvm-svn: 141425
2011-10-07 22:21:02 +00:00
Anna Zaks
754eafb765
[analyzer] Previously, we were passing to CheckerContext enough info to construct ProgramPoint and it would pass it to NodeBuilder, which in turn would construct the ProgramPoint. Simplify it by just passing the ProgramPoint to CheckerContext. The ProgramPoint can only change if a checker tags it, in which case, we create a copy with the given tag.
...
(A step closer to making CheckerContext work with all node builders, not only StmtNodeBuilder.)
llvm-svn: 141417
2011-10-07 21:52:33 +00:00
Anna Zaks
8de8cfdd21
ProgramPoint cleanup after the previous commit r141408 (remove the copy constructor, mark withTag const).
...
Move getProgramPoint() utility from CoreEngine.cpp into ProgramPoint.
llvm-svn: 141414
2011-10-07 21:01:38 +00:00
John McCall
f937c023bf
Rename TagDecl::isDefinition -> isCompleteDefinition
...
for better self-documenting code, since the semantics
are subtly different from getDefinition().
llvm-svn: 141355
2011-10-07 06:10:15 +00:00
Ted Kremenek
b7531d622d
[static analyzer] Fix crash in LiveVariables and Environment::getSVal() when analyzing C++ pointer-to-member calls. Fixes <rdar://problem/10243398>.
...
llvm-svn: 141312
2011-10-06 20:53:28 +00:00
Peter Collingbourne
d937a99465
Clang-side build system infrastructure for multiple tblgens.
...
llvm-svn: 141267
2011-10-06 01:52:10 +00:00
Anna Zaks
3e0f415d0d
[analyzer] Remove the dependency on CheckerContext::getStmt() as well as the method itself.
...
llvm-svn: 141262
2011-10-06 00:43:15 +00:00
Ted Kremenek
f3e3f6645e
Fix major regression in RetainCountChecker. DefaultSummaries were not being used when they were meant to be. Fixes <rdar://problem/10241614>.
...
llvm-svn: 141250
2011-10-05 23:54:29 +00:00
Anna Zaks
c4aa22cdd4
[analyzer] Remove the last dependency on CheckerContext::getNodeBuilder() as well as the method itself.
...
Checkers should not directly access NodeBuilder, nodes can be created by calling the CheckerContext's generateNode() methods.
llvm-svn: 141249
2011-10-05 23:44:11 +00:00
Anna Zaks
77f8661d18
[analyzer] OSAtomicChecker implements evalCall in a very invasive way - it essentially simulates inlining of compareAndSwap() by means of setting the NodeBuilder flags and calling ExprEngine directly.
...
This commit introduces a new callback just for this checker to unblock checker API cleanup.
llvm-svn: 141246
2011-10-05 23:37:30 +00:00
Anna Zaks
8569d2d8f2
[analyzer] Removing more references to CheckerContext::getNodeBuilder(): ask CheckerContext to generate the nodes.
...
llvm-svn: 141136
2011-10-04 23:29:16 +00:00
Anna Zaks
23d7ba3579
[analyzer] Removing references to CheckerContext::getNodeBuilder(): checkers can obtain block count directly from the Context.
...
llvm-svn: 141112
2011-10-04 20:43:05 +00:00
Anna Zaks
c76ec12ccf
[analyzer] Remove unused methods, add comments to others.
...
llvm-svn: 141098
2011-10-04 18:34:40 +00:00
Anna Zaks
208d54ce09
[analyzer] Remove redundant state (AnalysisContext pointer for every BinaryOperator tracked) from IdempotentOperationChecker.
...
llvm-svn: 141045
2011-10-03 23:07:13 +00:00
Anna Zaks
892427e2fa
[analyzer] In UndefBranchChecker, use a node generator which does not create an edge/branching. (ExprEngine should be in charge of generating edges. The checkers should examine the condition and generate PostCondition node if needed.)
...
llvm-svn: 141034
2011-10-03 21:55:56 +00:00
Anna Zaks
c42197d0f8
[analyzer] Cleanup in UndefBranchChecker:
...
- Remove unused FindUndefExpr::ProgramStateManager.
- The Condition parameter of the callback is the terminator of the block, no need to retrieve it again.
llvm-svn: 141027
2011-10-03 21:16:32 +00:00
Argyrios Kyrtzidis
b8c3aaf479
Allow getting all source locations of selector identifiers in a ObjCMethodDecl.
...
Instead of always storing all source locations for the selector identifiers
we check whether all the identifiers are in a "standard" position; "standard" position is
-Immediately before the arguments: -(id)first:(int)x second:(int)y;
-With a space between the arguments: -(id)first: (int)x second: (int)y;
-For nullary selectors, immediately before ';': -(void)release;
In such cases we infer the locations instead of storing them.
llvm-svn: 140989
2011-10-03 06:37:04 +00:00
Ted Kremenek
2a14c695eb
Fix LiveVariables analysis bug with MaterializeTemporaryExpr and fix handling in ExprEngine. Fixes <rdar://problem/10201666>.
...
llvm-svn: 140956
2011-10-02 00:54:48 +00:00
Anna Zaks
79ada929b7
Address PR10616. The crash has already been fixed by Ted in r140725, so just refactor to use existing API + test case.
...
llvm-svn: 140932
2011-10-01 06:35:19 +00:00
John McCall
525f05597f
Tweak the interface for analyzing the CF conventions for a name
...
to take a FunctionDecl* instead of an llvm::StringRef. Eventually
we might push more logic in there, like using slightly different
conventions for C++ methods.
Also, fix a bug where 'copy' and 'create' were being caught in
non-camel-cased strings. We want copyFoo and CopyFoo and XCopy
but not Xcopy or xcopy.
llvm-svn: 140911
2011-10-01 00:48:56 +00:00
Ted Kremenek
afedc07a9b
Fix crash when analyzing C++ code involving constant enums and switch statements (<rdar://problem/10202899>).
...
llvm-svn: 140844
2011-09-30 03:51:54 +00:00
Anna Zaks
819b0d8619
[analyzer] Fix a bug in RetainReleaseChecker diagnostics. It gives more precise error message on the modified test case (and prevents duplicate diagnostics when we purge at block granularity).
...
llvm-svn: 140840
2011-09-30 02:19:19 +00:00
Anna Zaks
8d4c8e1498
[analyzer] Add -analyzer-purge option which can take on multiple values, remove -analyzer-purge=none. (Small refactor as well: move the work of constructing AnalysisManager from the callers to the class itself.)
...
llvm-svn: 140838
2011-09-30 02:03:00 +00:00
Ted Kremenek
252e03596a
Check for empty predecessors for walking them.
...
llvm-svn: 140725
2011-09-28 21:20:00 +00:00
Anna Zaks
0070c6d4db
Fix a crash in MallocOverflowSecurityChecker. Patch by Lei Zhang.
...
llvm-svn: 140648
2011-09-27 22:25:01 +00:00
David Blaikie
0cc494361c
Renaming PathDiagnosticClients.h to PathDiagnosticConsumers.h (issue 5397)
...
llvm-svn: 140596
2011-09-27 01:43:33 +00:00
David Blaikie
53c125d063
Rename PathDiagnosticClient to PathDiagnosticConsumer as per issue 5397
...
llvm-svn: 140492
2011-09-26 00:51:36 +00:00
David Blaikie
9c902b5502
Rename Diagnostic to DiagnosticsEngine as per issue 5397
...
llvm-svn: 140478
2011-09-25 23:23:43 +00:00
Benjamin Kramer
1f88d2f531
Fix comment typo.
...
Patch by Rui Paulo!
llvm-svn: 140448
2011-09-24 03:04:03 +00:00
David Blaikie
aa347f9392
Removing a bunch of dead returns/breaks after llvm_unreachables.
...
llvm-svn: 140407
2011-09-23 20:26:49 +00:00
Anna Zaks
ff7da05670
Move immutable map canonization out of the removeDeadBindings loop (via using ImmutableMapRef). Gives ~2% speedup.
...
llvm-svn: 140403
2011-09-23 19:14:09 +00:00
David Blaikie
83d382b1ca
Switch assert(0/false) llvm_unreachable.
...
llvm-svn: 140367
2011-09-23 05:06:16 +00:00
Anna Zaks
9db35a8750
ST->scanReachableSymbols() is creating a SubRegionMap (SRM) on every call since one SRM is created in each ScanReachableSymbols instance. Creating the object just once and calling only scan inside the loop gives ~ 14% speed up of the StaticAnalyzer run (Release+Asserts).
...
Pull out the declaration of the ScanReachableSymbols so that it can be used directly. Document ProgramState::scanReachableSymbols() methods.
llvm-svn: 140323
2011-09-22 18:10:41 +00:00
Anna Zaks
15ca5e7a21
[analyzer] Fix a bug where PathDiagnosticLocation did not generate a valid range and add asserts to check validity of locations early on. Ignore invalid ranges in PathDiagnosticPiece (they could be added by checker writers).
...
Addresses radar://10124836 and radar://radar10102244.
llvm-svn: 140218
2011-09-21 00:35:58 +00:00
Anna Zaks
d70da08160
[analyzer] Refactor PathDiagnosticLocation: Remove SourceRange member from PathDiagnosticLocation - FullSourceLoc Loc and PathDiagnosticRange Range are sufficient.
...
llvm-svn: 140206
2011-09-20 23:27:32 +00:00
Anna Zaks
6800ab437c
[analyzer] Remove dead code. (This code is trying to implement the idea that PathDiagnosticClient could implement DiagnosticClient and has been dead for a while).
...
llvm-svn: 140198
2011-09-20 22:30:48 +00:00
Anna Zaks
c29bed3989
[analyzer] Refactor PathDiagnosticLocation: Make PathDiagnosticLocation(SourceLocation...) private. Most of the effort here goes to making BugReport refer to a PathDiagnosticLocation instead of FullSourceLocation.
...
(Another step closer to the goal of having Diagnostics which can recover from invalid SourceLocations.)
llvm-svn: 140182
2011-09-20 21:38:35 +00:00
Anna Zaks
b2dfc2b7be
[analyzer] Refactor PathDiagnosticLocation: Use the pre-computed Range and Location for profile.
...
llvm-svn: 140180
2011-09-20 21:25:00 +00:00
Anna Zaks
83128bc101
[analyzer] Refactor PathDiagnosticLocation: Use PointerUnion of LocationContext and AnalysisContext to support creation of PathDiagnosticLocations for checkers which no context sensitivity.
...
llvm-svn: 140162
2011-09-20 18:23:52 +00:00
Anna Zaks
de03d72a7b
[analyzer] Refactor PathDiagnosticLocation: Lazily query LocationContext for a ParentMap as needed.
...
llvm-svn: 140147
2011-09-20 16:37:36 +00:00
Anna Zaks
22fec1c4d9
[analyzer] Remove LocationContext and a dependency from PathDiagnosticLoaction.
...
llvm-svn: 140146
2011-09-20 16:23:37 +00:00
Anna Zaks
745486a5da
[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
2011-09-20 01:51:40 +00:00
Anna Zaks
de8c5eddb9
[analyzer] Use more create methods in the PathDiagnostic, cleanup.
...
llvm-svn: 140130
2011-09-20 01:38:47 +00:00
Anna Zaks
6e76384c82
[analyzer] BugReport has a profile method, so reuse it here.
...
llvm-svn: 140100
2011-09-19 23:44:31 +00:00
Argyrios Kyrtzidis
e6e67deeed
Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.
...
It already works (and is useful with) macro locs as well.
llvm-svn: 140057
2011-09-19 20:40:19 +00:00
Anna Zaks
efd182d992
[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
2011-09-16 19:18:30 +00:00
Anna Zaks
207c68012a
[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
2011-09-15 20:06:34 +00:00
Anna Zaks
921f04924f
[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
2011-09-15 18:56:07 +00:00
Anna Zaks
3a769bd996
[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
2011-09-15 01:08:34 +00:00
Anna Zaks
615e3a69c3
[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
2011-09-14 17:48:01 +00:00
Anna Zaks
2c65eea947
[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
2011-09-14 00:25:17 +00:00
Douglas Gregor
79a91418bd
Switch LangOptions over to a .def file that describes header of the
...
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
2011-09-13 17:21:33 +00:00
Anna Zaks
79301b16f3
[analyzer] Fix a failure encountered while analyzing bind (radar://10105448).
...
llvm-svn: 139509
2011-09-12 18:07:30 +00:00
Anna Zaks
295208d744
[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
2011-09-12 17:56:08 +00:00
John McCall
2d637d2e79
Rename the ARC cast kinds to start with "ARC".
...
llvm-svn: 139466
2011-09-10 06:18:15 +00:00
John McCall
cd78e805e9
When converting a block pointer to an Objective-C pointer type, extend
...
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
2011-09-10 01:16:55 +00:00
Anna Zaks
dfbea6b244
[analyzer] -analyze-function for ObjectiveC should check if any of the methods match the name (not only the first one).
...
llvm-svn: 139439
2011-09-10 00:12:23 +00:00
John McCall
9320b87cff
Give conversions of block pointers to ObjC pointers a different cast kind
...
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
2011-09-09 05:25:32 +00:00
Benjamin Kramer
2667afa980
Make helpers static, remove unused variables.
...
llvm-svn: 139078
2011-09-03 03:30:59 +00:00
Jordy Rose
087611ed81
[analyzer] Remove TransferFuncs.h, then deal with the fallout.
...
And with that, TransferFuncs is gone!
llvm-svn: 139003
2011-09-02 08:02:59 +00:00
Jordy Rose
75e680eae3
[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
2011-09-02 06:44:22 +00:00
Jordy Rose
dd7a654b1a
[analyzer] Remove lingering CFRefCount creation, which would have resulted in a leak. There's room for improvement here...
...
llvm-svn: 139000
2011-09-02 06:29:27 +00:00
Jordy Rose
a87a2775fa
[analyzer] Fix member initialization order. No functionality change.
...
llvm-svn: 138999
2011-09-02 06:21:26 +00:00
Jordy Rose
c49ec53e29
[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
2011-09-02 05:55:19 +00:00
Douglas Gregor
e8bbc12152
Extend the ASTContext constructor to delay the initialization of
...
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
2011-09-02 00:18:52 +00:00
Zhongxing Xu
bfb8e2fe6e
If size was equal to 0, either NULL or a pointer suitable to be passed to
...
free() is returned by realloc(). Most code expect NULL.
And we only need to transfer one final ProgramState.
llvm-svn: 138937
2011-09-01 04:53:59 +00:00
Jordy Rose
973a8886f6
[analyzer] Fix varargs helper to only use POD types even for named arguments. Thanks, Joerg.
...
llvm-svn: 138875
2011-08-31 18:33:45 +00:00
Anna Zaks
50dd696339
[analyzer] MacOSKeychainAPIChecker: Simplify getSymbolForRegion by using existing API. Thanks Jordy.
...
llvm-svn: 138765
2011-08-29 21:10:00 +00:00
Anna Zaks
814adf7752
Fix: Bug 10798 - [analyzer] Crash when analyzing ICU. (A slight improvement on the previous commit.)
...
llvm-svn: 138762
2011-08-29 20:43:37 +00:00
Anna Zaks
cda129eb1c
Fix bug 10797: Crash: "cast<Ty>() argument of incompatible type!" assert when analyzing ICU.
...
Patch by Jean-Daniel Dupas. Thanks for spotting and fixing!
llvm-svn: 138757
2011-08-29 20:05:54 +00:00
Jordy Rose
58a20d31b7
[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
2011-08-28 19:11:56 +00:00
Jordy Rose
e9ff97b850
[analyzer] Remove the ProgramState argument from ExprEngine::evalBind; we were ignoring it anyway. No functionality change.
...
llvm-svn: 138720
2011-08-28 06:02:28 +00:00
Jordy Rose
d26e9e7f7c
[analyzer] Eliminate almost all uses of TransferFuncs from ExprEngine.
...
llvm-svn: 138719
2011-08-28 05:54:23 +00:00
Jordy Rose
d188d66e69
[analyzer] Migrate argument invalidation from CFRefCount to ExprEngine.
...
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
2011-08-28 05:16:28 +00:00
Jordy Rose
1fad663126
[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
2011-08-27 22:51:26 +00:00
Ted Kremenek
996bfab499
[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
2011-08-27 21:39:14 +00:00
Ted Kremenek
60120fb1b1
[analyzer] Pull body of loop in AnalysisConsumer::HandleDeclContext() into its own method. No real functionality change.
...
llvm-svn: 138712
2011-08-27 21:28:09 +00:00
Jordy Rose
256a6dd13b
[analyzer] Remove a couple of unnecessary returns after llvm_unreachables.
...
llvm-svn: 138649
2011-08-26 20:32:01 +00:00
Jeffrey Yasskin
0e9cdbbb06
Handle CXXTempObjectRegion in StackAddrEscapeChecker.
...
Also convert stack-addr-ps.cpp to use the analyzer instead of just Sema, now
that it doesn't crash, and extract the stack-block test into another file since
it errors, and that prevents the analyzer from running.
llvm-svn: 138613
2011-08-26 00:41:31 +00:00
Jordy Rose
15484daafe
[analyzer] Move the leak bugs from CFRefCount to RetainReleaseChecker, with a level of indirection to handle GC vs. non-GC.
...
llvm-svn: 138538
2011-08-25 01:14:38 +00:00
Anna Zaks
5be8a4d104
[analyzer] MacOSKeychainAPIChecker: Cleanup AllocationState structure.
...
llvm-svn: 138535
2011-08-25 00:59:06 +00:00
Jordy Rose
4ba0ba42e2
[analyzer] Move the easy bug types from CFRefCount to RetainReleaseChecker.
...
(These bug types may have just been leaked before...!)
llvm-svn: 138532
2011-08-25 00:34:03 +00:00
Anna Zaks
85913db489
[analyzer] MacOSKeychainAPIChecker: Add the custom BugReport visitor(which highlights the allocation site) to all the relevant reports within the checker.
...
llvm-svn: 138531
2011-08-25 00:32:42 +00:00
Jordy Rose
8b289a2cbd
[analyzer] Move the RetainSummaryManager from CFRefCount to RetainReleaseChecker.
...
Because Checkers live for an entire translation unit, this persists summary caches across multiple code bodies and avoids repeated initialization (but probably at the cost of memory). This removes the last references from RetainReleaseChecker to CFRefCount.
llvm-svn: 138529
2011-08-25 00:10:37 +00:00
Jordy Rose
a4c41bb875
[analyzer] Better fix for the "missing return" error, from Ted.
...
llvm-svn: 138526
2011-08-24 23:41:46 +00:00
Jordy Rose
34a83e911f
[analyzer] Silence another incorrect warning ("control reaches end of non-void function")
...
llvm-svn: 138510
2011-08-24 22:58:49 +00:00
Jordy Rose
763982b82d
[analyzer] Remove experimental FIXME that never actually applied to the code in trunk.
...
llvm-svn: 138508
2011-08-24 22:45:12 +00:00
Jordy Rose
184bd1430b
[analyzer] CFRefReport and friends no longer depend on CFRefCount.
...
llvm-svn: 138506
2011-08-24 22:39:09 +00:00
Anna Zaks
f880cff209
[analyzer] Do not use references in std::pair.
...
llvm-svn: 138497
2011-08-24 21:58:55 +00:00
Anna Zaks
0d67579497
[analyzer] Unbreak the release buildbot.
...
llvm-svn: 138493
2011-08-24 21:40:10 +00:00
Anna Zaks
be460898bb
[analyzer] MacOSKeychainAPIChecker: Provide reacher diagnostic trace by pointing to the allocation site when reporting a leak.
...
llvm-svn: 138479
2011-08-24 20:52:46 +00:00
Jordy Rose
9ff0299935
[analyzer] Silence an (incorrect) uninitialized variable warning, caught by Cameron.
...
llvm-svn: 138477
2011-08-24 20:38:42 +00:00
Jordy Rose
38eea65acd
[analyzer] Copy GC mode setting from CFRefCount to RetainReleaseChecker in preparation for getting rid of CFRefCount.
...
This is a little hacky for now but will get better once we decide the best way to handle this.
llvm-svn: 138476
2011-08-24 20:33:55 +00:00
Anna Zaks
45aa208554
[analyzer] Allow checker writes to specify that no region should be accosiated with the report. (Useful when we report an error on endOfPath or deadSymbols, when the range of the last expression might have nothing to do with the error.)
...
llvm-svn: 138474
2011-08-24 20:31:06 +00:00
Jordy Rose
e8743a7499
[analyzer] Remove unused DoNothingByRef and the special case for CFDictionaryCreate.
...
This is a very small regression (actually introduced in r138309) because it won't catch leaks of objects passed by reference to CFDictionaryCreate (they're considered to have escaped and are ignored). If this is important we can put in a specific eval::Call to restore the functionality.
llvm-svn: 138464
2011-08-24 19:10:50 +00:00