| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D52337
llvm-svn: 342769
|
|
|
|
|
|
|
|
|
|
| |
statement, if possible
If not possible, use the last line of the declaration, as before.
Differential Revision: https://reviews.llvm.org/D52326
llvm-svn: 342768
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the non-sink report is generated at the exit node, it will be
suppressed by the current functionality in isInevitablySinking, as it
only checks the successors of the block, but not the block itself.
The bug shows up in RetainCountChecker checks.
Differential Revision: https://reviews.llvm.org/D52284
llvm-svn: 342766
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D52269
llvm-svn: 342765
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes a number of issues:
- Global variables are not used for communication
- Trait should be defined on a graph, not on a node
- Defining the trait on a graph allows us to use a correct allocator,
no longer crashing while printing trimmed graphs
Differential Revision: https://reviews.llvm.org/D52183
llvm-svn: 342413
|
|
|
|
|
|
|
|
| |
skip pointers whenever redundant, use unique prefixes.
Differential Revision: https://reviews.llvm.org/D52114
llvm-svn: 342316
|
|
|
|
|
|
|
|
|
|
| |
Those are not created in the allocator.
Since they are created fairly rarely, a counter overhead should not
affect the memory consumption.
Differential Revision: https://reviews.llvm.org/D51827
llvm-svn: 342314
|
|
|
|
|
|
|
|
| |
store
Differential Revision: https://reviews.llvm.org/D51826
llvm-svn: 342313
|
|
|
|
|
|
|
|
|
|
| |
exploded graph
Prevents bad centering.
Differential Revision: https://reviews.llvm.org/D51825
llvm-svn: 342312
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D51823
llvm-svn: 342310
|
|
|
|
|
|
|
|
|
|
| |
predecessors/successors
Still generate a node, but leave the redundant field empty.
Differential Revision: https://reviews.llvm.org/D51821
llvm-svn: 342308
|
|
|
|
|
|
|
|
| |
into the class
Differential Revision: https://reviews.llvm.org/D51513
llvm-svn: 341724
|
|
|
|
|
|
|
|
|
|
| |
HTMLDiagnostics
(NB: could be a clang-tidy / analyzer check)
Differential Revision: https://reviews.llvm.org/D51512
llvm-svn: 341723
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
extra map
The "derived" symbols indicate children fields of a larger symbol.
As parents do not have pointers to their children, the garbage
collection algorithm the analyzer currently uses adds such symbols into
a "postponed" category, and then keeps running through the worklist
until the fixed point is reached.
The current patch rectifies that by instead using a helper map which
stores pointers from parents to children, so that no fixed point
calculation is necessary.
The current patch yields ~5% improvement in running time on sqlite.
Differential Revision: https://reviews.llvm.org/D51397
llvm-svn: 341722
|
|
|
|
|
|
|
|
|
|
| |
output, update tests""""
This reverts commit 2f5d71d9fa135be86bb299e7d773036e50bf1df6.
Hopefully fixing tests on Windows.
llvm-svn: 341719
|
|
|
|
|
|
|
|
| |
update tests"""
Reverts analyzer tests from rL341627 again as they still broke windows buildbots
llvm-svn: 341648
|
|
|
|
|
|
|
|
|
|
| |
tests""
This reverts commit a39bcab414dd7ace7e490363ecdf01ecce7743fc.
Reverting the revert, fixing tests.
llvm-svn: 341627
|
|
|
|
|
|
|
|
| |
This reverts commit 03d183b6b94eda27ce66a4f9b87a00b0a148cf9e.
Temporary revert until the tests are fixed.
llvm-svn: 341626
|
|
|
|
|
|
|
|
| |
Split tests which were still using FileCheck to compare plists.
Differential Revision: https://reviews.llvm.org/D51515
llvm-svn: 341621
|
|
|
|
|
|
|
|
| |
When object is owned elsewhere
Differential Revision: https://reviews.llvm.org/D51669
llvm-svn: 341620
|
|
|
|
|
|
|
|
| |
Raw FileIDs are needed for the PlistDiagnostics to produce stable filenames.
Differential Revision: https://reviews.llvm.org/D51668
llvm-svn: 341619
|
|
|
|
|
|
|
|
| |
Invalid source locations may arise from generated code.
Differential Revision: https://reviews.llvm.org/D51761
llvm-svn: 341618
|
|
|
|
|
|
|
|
| |
So it can be reused across different consumers.
Differential Revision: https://reviews.llvm.org/D51514
llvm-svn: 341617
|
|
|
|
|
|
|
|
|
|
|
| |
A node is considered to be trivial if it only has one successor, one
predecessor, and a state equal to the predecessor.
Can drastically (> 2x) reduce the size of the generated exploded
graph.
Differential Revision: https://reviews.llvm.org/D51665
llvm-svn: 341616
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D51666
llvm-svn: 341603
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D51667
llvm-svn: 341602
|
|
|
|
|
|
|
|
|
|
| |
Ubigraph project has been dead since about 2008, and to the best of my
knowledge, no one was using it.
Previously, I wasn't able to launch the existing binary at all.
Differential Revision: https://reviews.llvm.org/D51655
llvm-svn: 341601
|
|
|
|
|
|
|
|
| |
exploded graph
Differential Revision: https://reviews.llvm.org/D51395
llvm-svn: 341600
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a new MemRegion sub-class, CXXDerivedObjectRegion, which is
the opposite of CXXBaseObjectRegion, to represent such casts. Such region is
a bit weird because it is by design bigger than its super-region.
But it's not harmful when it is put on top of a SymbolicRegion
that has unknown extent anyway.
Offset computation for CXXDerivedObjectRegion and proper modeling of casts
still remains to be implemented.
Differential Revision: https://reviews.llvm.org/D51191
llvm-svn: 340984
|
|
|
|
|
|
|
|
|
|
|
| |
The analyzer doesn't make use of them anyway and they seem to have
pretty weird AST from time to time, so let's just skip them for now.
Fixes a crash reported as pr37769.
Differential Revision: https://reviews.llvm.org/D50855
llvm-svn: 340977
|
|
|
|
|
|
|
|
|
|
|
| |
By making sure the returned value from getKnownSVal is consistent with
the value used inside expression engine.
PR38427
Differential Revision: https://reviews.llvm.org/D51252
llvm-svn: 340965
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D51251
llvm-svn: 340963
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D51250
llvm-svn: 340962
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D51184
llvm-svn: 340961
|
|
|
|
|
|
|
|
| |
Renames InvalidateRegionsWorker and RemoveDeadBindingsWorker
Differential Revision: https://reviews.llvm.org/D51324
llvm-svn: 340960
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NFC.
Summary:
With this patch, the SMT backend is almost completely detached from the CSA.
Unfortunate consequence is that we missed the `ConditionTruthVal` from the CSA and had to use `Optional<bool>`.
The Z3 solver implementation is still in the same file as the `Z3ConstraintManager`, in `lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp` though, but except for that, the SMT API can be moved to anywhere in the codebase.
Reviewers: NoQ, george.karpenkov
Reviewed By: george.karpenkov
Subscribers: xazax.hun, szepet, a.sidorin, Szelethus
Differential Revision: https://reviews.llvm.org/D50772
llvm-svn: 340534
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from solver specific implementations. NFC.
Summary:
By making SMTConstraintManager a template and passing the SMT constraint type and expr, we can further move code from the Z3ConstraintManager class to the generic SMT constraint Manager.
Now, each SMT specific constraint manager only needs to implement the method `bool canReasonAbout(SVal X) const`.
Reviewers: NoQ, george.karpenkov
Reviewed By: george.karpenkov
Subscribers: mgorny, xazax.hun, szepet, a.sidorin, Szelethus
Differential Revision: https://reviews.llvm.org/D50770
llvm-svn: 340533
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: There is no reason to have a base class for a context anymore as each SMT object carries a reference to the specific solver context.
Reviewers: NoQ, george.karpenkov, hiraditya
Reviewed By: hiraditya
Subscribers: hiraditya, xazax.hun, szepet, a.sidorin, Szelethus
Differential Revision: https://reviews.llvm.org/D50768
llvm-svn: 340532
|
|
|
|
|
|
| |
The result of the dyn_cast wasn't used to we can just check isa.
llvm-svn: 340531
|
|
|
|
|
|
|
|
|
|
| |
The compiler warned:
../tools/clang/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp:329:19: error: unused variable 'MD' [-Werror,-Wunused-variable]
if (const auto *MD = dyn_cast<CXXMethodDecl>(FD)) {
^
1 error generated.
llvm-svn: 340524
|
|
|
|
|
|
|
|
| |
Has quite a lot of false positives, disabled behind the flag.
Differential Revision: https://reviews.llvm.org/D50880
llvm-svn: 340502
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tracking those can help to provide much better diagnostics in many cases.
In general, most of the visitor machinery should be refactored to allow
tracking the origin of arbitrary values.
rdar://36039765
Differential Revision: https://reviews.llvm.org/D51131
llvm-svn: 340475
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D51130
llvm-svn: 340473
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
`CallDecription` can only handle function for the time being. If we want to match c++ method, we can only use method name to match and can't improve the matching accuracy through the qualifiers.
This patch add the support for `QualifiedName` matching to improve the matching accuracy.
Reviewers: xazax.hun, NoQ, george.karpenkov, rnkovacs
Reviewed By: xazax.hun, NoQ, rnkovacs
Subscribers: Szelethus, szepet, rnkovacs, a.sidorin, mikhail.ramalho, cfe-commits, MTC
Differential Revision: https://reviews.llvm.org/D48027
llvm-svn: 340407
|
|
|
|
|
|
|
|
|
|
| |
Turns out it can't be removed from the analyzer since it relies on CallEvent.
Moving to staticAnalyzer/core
Differential Revision: https://reviews.llvm.org/D51023
llvm-svn: 340247
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically, AttributedType now tracks a regular attr::Kind rather than
having its own parallel Kind enumeration, and AttributedTypeLoc now
holds an Attr* instead of holding an ad-hoc collection of Attr fields.
Differential Revision: https://reviews.llvm.org/D50526
This reinstates r339623, reverted in r339638, with a fix to not fail
template instantiation if we instantiate a QualType with no associated
type source information and we encounter an AttributedType.
llvm-svn: 340215
|
|
|
|
| |
llvm-svn: 339747
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Once CFG-side support for argument construction contexts landed in r338436,
the analyzer could make use of them to evaluate argument constructors properly.
When evaluated as calls, constructors of arguments now use the variable region
of the parameter as their target. The corresponding stack frame does not yet
exist when the parameter is constructed, and this stack frame is created
eagerly.
Construction of functions whose body is unavailable and of virtual functions
is not yet supported. Part of the reason is the analyzer doesn't consistently
use canonical declarations o identify the function in these cases, and every
re-declaration or potential override comes with its own set of parameter
declarations. Also it is less important because if the function is not
inlined, there's usually no benefit in inlining the argument constructor.
Differential Revision: https://reviews.llvm.org/D49443
llvm-svn: 339745
|
|
|
|
|
|
|
|
| |
This breaks compiling atlwin.h in Chromium. I'm sure the code is invalid
in some way, but we put a lot of work into accepting it, and I'm sure
rejecting it was not an intended consequence of this refactoring. :)
llvm-svn: 339638
|
|
|
|
|
|
|
|
|
|
| |
Specifically, AttributedType now tracks a regular attr::Kind rather than
having its own parallel Kind enumeration, and AttributedTypeLoc now
holds an Attr* instead of holding an ad-hoc collection of Attr fields.
Differential Revision: https://reviews.llvm.org/D50526
llvm-svn: 339623
|