| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 163514
|
| |
|
|
|
|
|
|
|
| |
I need to see how this breaks on other platforms when I fix the issue
that Benjamin Kramer pointed out.
This includes r163489 and r163490, plus a two line change.
llvm-svn: 163512
|
| |
|
|
|
|
|
|
| |
Android uses the same flavour of crt*.o for PIE and non-PIE executables, and a
different one for DSOs. GNU/Linux, on the other hand, uses one set of crt*.o
for non-PIE executables, and another for both PIE executables and DSOs.
llvm-svn: 163500
|
| |
|
|
|
|
|
| |
r163489, "Take another crack at stabilizing the emission order of analyzer"
r163490, "Use isBeforeInTranslationUnitThan() instead of operator<."
llvm-svn: 163497
|
| |
|
|
|
|
|
|
| |
or the name of a particular processor.
The patch reviewed by Douglas Gregor.
llvm-svn: 163492
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
diagnostics without using FoldingSetNodeIDs. This is done
by doing a complete recursive comparison of the PathDiagnostics.
Note that the previous method of comparing FoldingSetNodeIDs did
not end up relying on unstable things such as pointer addresses, so
I suspect this may still have some issues on various buildbots because
I'm not sure if the true source of non-determinism has been eliminated.
The tests pass for me, so the only way to know is to commit this change
and see what happens.
llvm-svn: 163489
|
| |
|
|
| |
llvm-svn: 163476
|
| |
|
|
|
|
|
|
|
| |
expected-warning-re to let matched for Win32 targets.
- format specifies type 'wchar_t **' (aka 'int **') but the argument has type 'float *'
- format specifies type 'wchar_t **' (aka 'unsigned short **') but the argument has type 'float *'
llvm-svn: 163468
|
| |
|
|
| |
llvm-svn: 163467
|
| |
|
|
|
|
| |
fixes the buildbots.
llvm-svn: 163462
|
| |
|
|
|
|
|
| |
PathDiagnosticEventPieces were *always* pruned. Instead, they
are suppose to only be pruned if the entire call gets pruned.
llvm-svn: 163460
|
| |
|
|
|
|
|
| |
string literal, produce a diagnostic pointing at the erroneous character
range, not at the start of the literal.
llvm-svn: 163459
|
| |
|
|
| |
llvm-svn: 163456
|
| |
|
|
|
|
|
| |
of the analyzer by using the FullProfile() of a PathDiagnostic
for ordering them.
llvm-svn: 163455
|
| |
|
|
|
|
|
| |
As a corollary to the previous commit, even when an extension is
available, we can still offer a fixit to the standard modifier.
llvm-svn: 163453
|
| |
|
|
|
|
|
|
|
| |
This seems to be a GNU libc extension; we offer a fixit to %lld on
these platforms.
<rdar://problem/11518237>
llvm-svn: 163452
|
| |
|
|
|
|
|
|
|
| |
the trap BB out of the individual checks and into a common function, to prepare
for making this code call into a runtime library. Rename the existing EmitCheck
to EmitTypeCheck to clarify it and to move it out of the way of the new
EmitCheck.
llvm-svn: 163451
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 163447
|
| |
|
|
| |
llvm-svn: 163446
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we'd just keep constraints around forever, which means we'd
never be able to merge paths that differed only in constraints on dead
symbols.
Because we now allow constraints on symbolic expressions, not just single
symbols, this requires changing SymExpr::symbol_iterator to include
intermediate symbol nodes in its traversal, not just the SymbolData leaf
nodes.
llvm-svn: 163444
|
| |
|
|
|
|
|
|
|
|
|
| |
This is necessary because further analysis will assume that the SVal's
type matches the AST type. This caused a crash when trying to perform
a derived-to-base cast on a C++ object that had been new'd to be another
object type.
Yet another crash in PR13763.
llvm-svn: 163442
|
| |
|
|
|
|
|
| |
Teach malloc sizeof checker to find type inconsistencies in multi-
dimensional arrays.
llvm-svn: 163438
|
| |
|
|
|
|
|
|
| |
in classes. Use it to flag those method implementations which don't
contain call to 'super' if they have 'super' class and it has the method
with this attribute set. This is wip. // rdar://6386358
llvm-svn: 163434
|
| |
|
|
|
|
|
|
|
| |
objc_retainAutoreleasedReturnValue, we need to also be killing
them during return peepholing. Make sure we recognize an
intervening bitcast, but more importantly, assert if we can't
find the asm marker at all. rdar://problem/12133032
llvm-svn: 163431
|
| |
|
|
|
|
| |
looking at PathPieces.
llvm-svn: 163427
|
| |
|
|
| |
llvm-svn: 163418
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
changes to RegionStore.
llvm-svn: 163406
|
| |
|
|
| |
llvm-svn: 163404
|
| |
|
|
|
|
| |
within part of a particular method.
llvm-svn: 163397
|
| |
|
|
| |
llvm-svn: 163389
|
| |
|
|
| |
llvm-svn: 163388
|
| |
|
|
|
|
| |
Apparently the output of this test is not deterministic. Needs investigation.
llvm-svn: 163377
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
of the analyzer, as the RetainReleaseChecker has many fine-grain
path diagnostic events that were not being checked. This uncovered
an inconsistency between the path diagnostics between Objective-C
and Objective-C++ code in ConditionBRVisitor that was fixed in a recent
patch.
llvm-svn: 163373
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
implicit pointer-to-boolean conversions in condition expressions. This would
result in inconsistent diagnostic emission between C and C++.
A consequence of this is now ConditionBRVisitor and TrackConstraintBRVisitor may
emit redundant diagnostics, for example:
"Assuming pointer value is null" (TrackConstraintBRVisitor)
"Assuming 'p' is null" (ConditionBRVisitor)
We need to reconcile the two, and perhaps prefer one over the other in some
cases.
llvm-svn: 163372
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
unexpanded parameter pack is a pack expansion. Thus, as with a non-type template
parameter which is a pack expansion, it needs to be expanded early into a fixed
list of template parameters.
Since the expanded list of template parameters is not itself a parameter pack,
it is permitted to appear before the end of the template parameter list, so also
remove that restriction (for both template template parameter pack expansions and
non-type template parameter pack expansions).
llvm-svn: 163369
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With some particularly evil casts, we can get an object whose dynamic type
is not actually a subclass of its static type. In this case, we won't even
find the statically-resolved method as a devirtualization candidate.
Rather than assert that this situation cannot occur, we now simply check
that the dynamic type is not an ancestor or descendent of the static type,
and leave it at that.
This error actually occurred analyzing LLVM: CallEventManager uses a
BumpPtrAllocator to allocate a concrete subclass of CallEvent
(FunctionCall), but then casts it to the actual subclass requested
(such as ObjCMethodCall) to perform the constructor.
Yet another crash in PR13763.
llvm-svn: 163367
|
| |
|
|
|
|
|
|
| |
return a CF object at all.
Fixes <rdar://problem/9566345>
llvm-svn: 163362
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A bizarre series of coincidences led us to generate a previously-seen
node in the middle of processing an Objective-C message, where we assume
the receiver is non-nil. We were assuming that such an assumption would
never "cache out" like this, and blithely went on using a null ExplodedNode
as the predecessor for the next step in evaluation.
Although the test case committed here is complicated, this could in theory
happen in other ways as well, so the correct fix is just to test if the
non-nil assumption results in an ExplodedNode we've seen before.
<rdar://problem/12243648>
llvm-svn: 163361
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 163350
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
handle. Otherwise, the AsmParser will explode if we try to generate an
object files.
llvm-svn: 163345
|
| |
|
|
|
|
|
| |
and output expressions much like that in GNU-style inline assembly. Output
expressions are first. Do this for MS-style inline asms.
llvm-svn: 163342
|
| |
|
|
|
|
| |
// rdar://12233989
llvm-svn: 163338
|
| |
|
|
|
|
| |
crash in a corner case. Patch by Olivier Goffart!
llvm-svn: 163337
|
| |
|
|
|
|
|
|
|
| |
This patch uses a new ABIInfo implementation specific to the le32
target, rather than falling back to DefaultABIInfo. Its behavior is
basically the same, but it also allows the regparm argument attribute.
It also includes basic tests for argument codegen and attributes.
llvm-svn: 163333
|