| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
function parameters
New check added to the checker which checks whether iterator parameters of template functions typed by the same template parameter refer to the same container.
Differential Revision: https://reviews.llvm.org/D32845
llvm-svn: 341790
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
Return value of dyn_cast_or_null should be checked before use.
Otherwise we may put a null pointer into the map as a key and eventually
crash in checkDeadSymbols.
Differential Revision: https://reviews.llvm.org/D51385
llvm-svn: 341092
|
|
|
|
|
|
|
|
| |
rdar://13729267
Differential Revision: https://reviews.llvm.org/D51323
llvm-svn: 340986
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Don't try to understand what's going on when there's a C++ method called eg.
CFRetain().
Refactor the checker a bit, to use more modern APIs.
Differential Revision: https://reviews.llvm.org/D50866
llvm-svn: 340982
|
|
|
|
|
|
|
|
|
|
|
| |
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/D51322
llvm-svn: 340964
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
assignments
We add check for invalidation of iterators. The only operation we handle here
is the (copy) assignment.
Differential Revision: https://reviews.llvm.org/D32747
llvm-svn: 340805
|
|
|
|
| |
llvm-svn: 340743
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
This reverts commit 3073790e87378fea9a68fb052185fec9596ef135.
The check is not correct, strlact(dest, "mystr", sizeof(dest)) is fine.
llvm-svn: 340501
|
|
|
|
|
|
| |
This reverts commit 6b43b80320722da41ca6ef7a3b57cc300fb83094.
llvm-svn: 340500
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
This is tested in a subsequent commit, which allows tracking those values.
Differential Revision: https://reviews.llvm.org/D51139
llvm-svn: 340474
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D51072
llvm-svn: 340378
|
|
|
|
|
|
|
|
| |
RetainCountChecker
Differential Revision: https://reviews.llvm.org/D51071
llvm-svn: 340377
|
|
|
|
| |
llvm-svn: 340280
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
inherited data members
For the following example:
struct Base {
int x;
};
// In a different translation unit
struct Derived : public Base {
Derived() {}
};
For a call to Derived::Derived(), we'll receive a note that
this->x is uninitialized. Since x is not a direct field of Derived,
it could be a little confusing. This patch aims to fix this, as well
as the case when the derived object has a field that has the name as
an inherited uninitialized data member:
struct Base {
int x; // note: uninitialized field 'this->Base::x'
};
struct Derived : public Base {
int x = 5;
Derived() {}
};
Differential Revision: https://reviews.llvm.org/D50905
llvm-svn: 340272
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D50904
llvm-svn: 340266
|
|
|
|
|
|
|
|
|
|
|
|
| |
to a function
Now that it has it's own file, it makes little sense for
isPointerOrReferenceUninit to be this large, so I moved
dereferencing to a separate function.
Differential Revision: https://reviews.llvm.org/D50509
llvm-svn: 340265
|
|
|
|
|
|
|
|
|
|
| |
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
|