| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 141345
|
|
|
|
|
|
| |
analyzing C++ pointer-to-member calls. Fixes <rdar://problem/10243398>.
llvm-svn: 141312
|
|
|
|
|
|
| |
canonicalizing the underlying ImmutableSets on every analyzed statement (just at merges). Fixes <rdar://problem/10087538>.
llvm-svn: 140958
|
|
|
|
|
|
| |
handling in ExprEngine. Fixes <rdar://problem/10201666>.
llvm-svn: 140956
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 140407
|
|
|
|
| |
llvm-svn: 140367
|
|
|
|
| |
llvm-svn: 140149
|
|
|
|
| |
llvm-svn: 140091
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
addressing two performance problems:
- Speed of "merge()", which merged data flow facts. This was doing a set canonicalization on every insertion, which was super slow.
To fix this, we use ImmutableSetRef.
- Visit CFGBlocks in reverse postorder. This is a huge speedup, as on some test cases the algorithm would take many iterations
to converge.
This contains a bunch of copy-paste from UninitializedValues.cpp and ThreadSafety.cpp. The idea
was to get something working first, and then refactor the common logic for all three files into
a separate analysis/library entry point.
llvm-svn: 139968
|
|
|
|
| |
llvm-svn: 139894
|
|
|
|
|
|
| |
required attributes
llvm-svn: 139804
|
|
|
|
|
|
| |
inteface. This eliminates a lot of unnecessary duplicated code.
llvm-svn: 139801
|
|
|
|
|
|
| |
interface, and making the destructor for the thread safety handler pure virtual
llvm-svn: 139722
|
|
|
|
|
|
| |
expanding the handling of these expressions
llvm-svn: 139720
|
|
|
|
|
|
|
| |
CFGElement. This will allow greatly simplifying the logic in
-Wreturn-type.
llvm-svn: 139593
|
|
|
|
|
|
|
| |
location with a single comment rather than scattering it in three
places.
llvm-svn: 139592
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
temporary objects and local variables. When detected, these split the
block, marking the new one as having only the exit block as a successor.
This prevents a large number of false positives in warnings sensitive to
no-return constructs such as -Wreturn-type, and fixes the remainder of
PR10063 along with several variations of this bug that had not been
reported. The test cases are extended across the board to cover these
patterns.
This also checks in a stress test for these types of CFGs. The stress
test declares some 32k variables, a mixture of no-return and normal
destructors. Previously, this resulted in roughly 2500 CFG blocks, but
didn't model any of the no-return destructors. With this patch, it
results in over 33k blocks, many of them now unreachable.
The nice thing about how the analyzer is set up? This causes *no*
regression in performance of building the CFG. It actually in some cases
makes it faster, as best I can benchmark. The analysis for -Wreturn-type
(and any other that cares about no-return code paths) is technically
slower now as it has to look at many more candidate blocks, but it
computes the correct answer. I have more test cases to follow, I think
they all work now. Also I have further work that should dramatically
simplify analyses in the presence of no-return.
llvm-svn: 139586
|
|
|
|
| |
llvm-svn: 139548
|
|
|
|
|
|
| |
assert.
llvm-svn: 139474
|
|
|
|
|
|
|
|
|
|
|
| |
and case statements. Use this to make the logic in the CFG builder more
robust at finding the actual statements within a compound statement,
even when there are many layers of labels obscuring it.
Also extend the test cases for a large chunk of PR10063. Still more work
to do here though.
llvm-svn: 139437
|
|
|
|
| |
llvm-svn: 139426
|
|
|
|
| |
llvm-svn: 139425
|
|
|
|
|
|
| |
building lock expressions. We now resolve this expressions, avoid crashing when encountering cast expressions, and have a diagnostic for unresolved lock expressions
llvm-svn: 139370
|
|
|
|
| |
llvm-svn: 139369
|
|
|
|
|
|
| |
dead code. Fixes <rdar://problem/10060250>.
llvm-svn: 139027
|
|
|
|
|
|
| |
This matches gcc's logic. Second half of PR10661.
llvm-svn: 138730
|
|
|
|
|
|
| |
should suppress false positives resulting from 'assert' and friends.
llvm-svn: 138576
|
|
|
|
|
|
|
|
|
|
| |
with how it
handled SCC's of dead code, or simply having false negatives by overly suppressing warnings.
WIP.
llvm-svn: 138410
|
|
|
|
|
|
| |
various analyses (e.g., reachability).
llvm-svn: 138409
|
|
|
|
| |
llvm-svn: 138408
|
|
|
|
|
|
|
|
|
|
|
| |
modeling sizeof(VLAs)
incorrectly in the CFG, and also the static analyzer. This patch regresses the analyzer a bit, but
that needs to be followed up with a better solution.
Fixes <rdar://problem/10008112>.
llvm-svn: 138372
|
|
|
|
| |
llvm-svn: 138183
|
|
|
|
| |
llvm-svn: 137896
|
|
|
|
|
|
| |
bunch of others I haven't touched.
llvm-svn: 137867
|
|
|
|
|
|
| |
and libStaticAnalyzer[*]. It was highly inconsistent, and very ugly to look at.
llvm-svn: 137537
|
|
|
|
|
|
|
| |
Having a notion of an actual ProgramPointTag will aid in introspection of the analyzer's behavior.
For example, the GraphViz output of the analyzer will pretty-print the tags in a useful manner.
llvm-svn: 137529
|
|
|
|
|
|
| |
gotos jumping after an object was declared. Fixes PR 10620."
llvm-svn: 137459
|
|
|
|
|
|
| |
jumping after an object was declared. Fixes PR 10620.
llvm-svn: 137426
|
|
|
|
|
|
| |
resulting from the recent -Wuninitialized changes.
llvm-svn: 137068
|
|
|
|
|
|
|
|
| |
avoid recursion to subexpression.
This exposed bugs in the live variables analysis, and a latent analyzer bug in the SymbolReaper.
llvm-svn: 137006
|
|
|
|
| |
llvm-svn: 136939
|
|
|
|
| |
llvm-svn: 136679
|
|
|
|
|
|
|
|
|
|
|
|
| |
be linearized only when used by the static analyzer. This required a rewrite of LiveVariables, and exposed a ton of subtle bugs.
The motivation of this large change is to drastically simplify the logic in ExprEngine going forward.
Some fallout is that the output of some BugReporterVisitors is not as accurate as before; those will
need to be fixed over time. There is also some possible performance regression as RemoveDeadBindings
will be called frequently; this can also be improved over time.
llvm-svn: 136419
|
|
|
|
|
|
|
|
| |
LLVM.h imports
them into the clang namespace.
llvm-svn: 135852
|
|
|
|
|
|
|
|
|
|
|
|
| |
AnalysisBasedWarnings Sema layer and out of the Analysis library itself.
This returns the uninitialized values analysis to a more pure form,
allowing its original logic to correctly detect some categories of
definitely uninitialized values. Fixes PR10358 (again).
Thanks to Ted for reviewing and updating this patch after his rewrite of
several portions of this analysis.
llvm-svn: 135748
|
|
|
|
|
|
| |
functionality change.
llvm-svn: 135666
|
|
|
|
|
|
| |
passed by reference.
llvm-svn: 135610
|
|
|
|
|
|
| |
lvalue-to-rvalue conversion in a DeclStmt.
llvm-svn: 135525
|
|
|
|
|
|
| |
conversion is wrapped in a parenthesis.
llvm-svn: 135519
|