| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
No need for the auxiliary flag. No need to generate a leak node when
there is no error.
llvm-svn: 166977
|
|
|
|
|
|
| |
This is an example checker for catching fopen fclose API misuses.
llvm-svn: 166976
|
|
|
|
|
|
| |
- Adding Immutable Map to GDM and getIdentifierInfo helper method.
llvm-svn: 166975
|
|
|
|
| |
llvm-svn: 166211
|
|
|
|
|
|
| |
@implementation.
llvm-svn: 166047
|
|
|
|
|
|
| |
Follow-up to r165838, which fixed a potential crash.
llvm-svn: 166002
|
|
|
|
| |
llvm-svn: 165993
|
|
|
|
| |
llvm-svn: 165992
|
|
|
|
| |
llvm-svn: 165842
|
|
|
|
|
|
|
| |
that a DeclRefExpr can never return a null decl. We possibly should
hoist this into getDecl() itself.
llvm-svn: 165841
|
|
|
|
|
|
| |
invariants using assertions.
llvm-svn: 165840
|
|
|
|
|
|
| |
the number of arguments.
llvm-svn: 165838
|
|
|
|
| |
llvm-svn: 165744
|
|
|
|
|
|
| |
objc_atomicCompareAndSwap.
llvm-svn: 165743
|
|
|
|
| |
llvm-svn: 164966
|
|
|
|
| |
llvm-svn: 164965
|
|
|
|
|
|
|
| |
The format of this output is a WIP; largely I'm bringing it up now
for regression testing. We can evolve the output format over time.
llvm-svn: 164953
|
|
|
|
|
|
|
|
|
|
|
| |
the validation occurred.
The original implementation was pessimistic - we assumed that ivars
which escape are invalidated. This version is optimistic, it assumes
that the ivars will always be explicitly invalidated: either set to nil
or sent an invalidation message.
llvm-svn: 164868
|
|
|
|
| |
llvm-svn: 164803
|
|
|
|
|
|
| |
through property getters.
llvm-svn: 164802
|
|
|
|
|
|
| |
(fixup for r164790)
llvm-svn: 164791
|
|
|
|
| |
llvm-svn: 164790
|
|
|
|
| |
llvm-svn: 164788
|
|
|
|
|
|
| |
See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164766
llvm-svn: 164769
|
|
|
|
| |
llvm-svn: 164766
|
|
|
|
|
|
| |
[-Wunused-private-field]
llvm-svn: 164745
|
|
|
|
|
|
|
|
|
|
|
| |
This checker is annotation driven. It checks that the annotated
invalidation method accesses all ivars of the enclosing objects that are
objects of type, which in turn contains an invalidation method.
This is driven by
__attribute((annotation("objc_instance_variable_invalidator")).
llvm-svn: 164716
|
|
|
|
|
|
| |
dispatch.
llvm-svn: 164579
|
|
|
|
|
|
| |
Just a refactoring of common infrastructure. No intended functionality change.
llvm-svn: 164443
|
|
|
|
|
|
|
|
|
|
|
| |
Like with struct fields, we want to catch cases like this early,
so that we can produce better diagnostics and path notes:
PointObj *p = nil;
int *px = &p->_x; // should warn here
*px = 1;
llvm-svn: 164442
|
|
|
|
|
|
|
|
|
|
|
| |
If someone provides their own function called 'strdup', or 'reallocf', or
even 'malloc', and we inlined it, the inlining should have given us all the
malloc-related information we need. If we then try to attach new information
to the return value, we could end up with spurious warnings.
<rdar://problem/12317671>
llvm-svn: 164276
|
|
|
|
|
|
|
|
|
|
|
| |
in ObjCMethods.
Extend FunctionTextRegion to represent ObjC methods as well as
functions. Note, it is not clear what type ObjCMethod region should
return. Since the type of the FunctionText region is not currently used,
defer solving this issue.
llvm-svn: 164046
|
|
|
|
| |
llvm-svn: 163828
|
|
|
|
|
|
|
|
|
|
| |
crazy case where dispatch_once gets redefined as a macro that calls
_dispatch_once (which calls the real dispatch_once). Users want to
see the warning in their own code.
Fixes <rdar://problem/11617767>
llvm-svn: 163816
|
|
|
|
|
|
|
|
| |
type is void.
Fixes a false positive found by analyzing LLVM code base.
llvm-svn: 163750
|
|
|
|
| |
llvm-svn: 163749
|
|
|
|
| |
llvm-svn: 163546
|
|
|
|
| |
llvm-svn: 163505
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ObjCSelfInitChecker stashes information in the GDM to persist it across
function calls; it is stored in pre-call checks and retrieved post-call.
The post-call check is supposed to clear out the stored state, but was
failing to do so in cases where the call did not have a symbolic return
value.
This was actually causing the inappropriate cache-out from r163361.
Per discussion with Anna, we should never actually cache out when
assuming the receiver of an Objective-C message is non-nil, because
we guarded that node generation by checking that the state has changed.
Therefore, the only states that could reach this exact ExplodedNode are
ones that should have merged /before/ making this assumption.
r163361 has been reverted and the test case removed, since it won't
actually test anything interesting now.
llvm-svn: 163449
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 163448
|
|
|
|
|
|
|
| |
Teach malloc sizeof checker to find type inconsistencies in multi-
dimensional arrays.
llvm-svn: 163438
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with at least one subtle bug in MacOSXKeyChainAPIChecker where the
calling the method was a substitute for assuming a symbolic value
was null (which is not the case).
We still keep ConstraintManager::getSymVal(), but we use that as
an optimization in SValBuilder and ProgramState::getSVal() to
constant-fold SVals. This is only if the ConstraintManager can
provide us with that information, which is no longer a requirement.
As part of this, introduce a default implementation of
ConstraintManager::getSymVal() which returns null.
For Checkers, introduce ConstraintManager::isNull(), which queries
the state to see if the symbolic value is constrained to be a null
value. It does this without assuming it has been implicitly constant
folded.
llvm-svn: 163428
|
|
|
|
|
|
|
| |
Don't warn when the sizeof argument is an array with the same element
type as the pointee of the return type.
llvm-svn: 163407
|
|
|
|
|
|
|
|
|
| |
While the check itself should count 0-based for the parameter index,
the diagnostic should be 1-based (first, second, third, not start at 0).
Fixes <rdar://problem/12249569>.
llvm-svn: 163375
|
|
|
|
|
|
|
|
| |
return a CF object at all.
Fixes <rdar://problem/9566345>
llvm-svn: 163362
|
|
|
|
|
|
|
|
| |
via function/method with [CF,NS]_RETURNS_NOT_RETAINED.
Fixes <rdar://problem/11379000>.
llvm-svn: 163355
|
|
|
|
|
|
|
|
|
| |
are used in EH code. Right now the CFG doesn't support exceptions well,
so we need this hack to avoid bogus dead store warnings.
Fixes <rdar://problem/12147586>
llvm-svn: 163353
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CXXDestructorCall now has a flag for when it is a base destructor call.
Other kinds of destructor calls (locals, fields, temporaries, and 'delete')
all behave as "whole-object" destructors and do not behave differently
from one another (specifically, in these cases we /should/ try to
devirtualize a call to a virtual destructor).
This was causing crashes in both our internal buildbot, the crash still
being tracked in PR13765, and some of the crashes being tracked in PR13763,
due to a assertion failure. (The behavior under -Asserts happened to be
correct anyway.)
Adding this knowledge also allows our DynamicTypePropagation checker to do
a bit less work; the special rules about virtual method calls during a
destructor only require extra handling during base destructors.
llvm-svn: 163348
|
|
|
|
|
|
| |
As per Jordan's suggestion. (Came out of code review for r163261.)
llvm-svn: 163269
|
|
|
|
|
|
|
| |
This region is set as interesting as part of trackNullOrUndefValue call,
no need to mark it as interesting twice.
llvm-svn: 163260
|