| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 108811
|
|
|
|
| |
llvm-svn: 108804
|
|
|
|
| |
llvm-svn: 108803
|
|
|
|
| |
llvm-svn: 108801
|
|
|
|
| |
llvm-svn: 108800
|
|
|
|
| |
llvm-svn: 108670
|
|
|
|
| |
llvm-svn: 108669
|
|
|
|
| |
llvm-svn: 108668
|
|
|
|
| |
llvm-svn: 108633
|
|
|
|
| |
llvm-svn: 108621
|
|
|
|
|
|
|
| |
Let AnalysisContext contain a TranslationUnit.
Let CallEnter refer to an AnalysisContext instead of a FunctionDecl.
llvm-svn: 108617
|
|
|
|
|
|
| |
removing a bogus assertion.
llvm-svn: 108602
|
|
|
|
|
|
| |
an APFloat with different "float semantics" than the compared float literal.
llvm-svn: 108590
|
|
|
|
|
|
|
|
|
|
| |
it into the default path-sensitive analysis options.
- Added checks for static local variables, self assigned parameters, and truncating/extending self assignments
- Removed command line option (now default with --analyze)
- Updated test cases to pass with idempotent operation warnings
llvm-svn: 108550
|
|
|
|
| |
llvm-svn: 108375
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reinterpret_casts (possibly indirectly via C-style/functional casts)
on values, e.g.,
int i;
reinterpret_cast<short&>(i);
The IR generated for this is essentially the same as for
*reinterpret_cast<short*>(&i).
Fixes PR6437, PR7593, and PR7344.
llvm-svn: 108294
|
|
|
|
|
|
| |
zero/nonzero sizes.
llvm-svn: 107935
|
|
|
|
|
|
| |
suppressing copies of objects with trivial copy constructors.
llvm-svn: 107857
|
|
|
|
|
|
| |
breaking bootstrap on Linux.
llvm-svn: 107837
|
|
|
|
|
|
| |
newly-narrowed scope. No functionality change.
llvm-svn: 107828
|
|
|
|
| |
llvm-svn: 107772
|
|
|
|
|
|
|
|
| |
This has 2 (slight) advantages:
-Make explicit at getBody()'s callsite that we expect/handle only CompoundStmt and not CXXTryStmt.
-Better tracking of Decl::getBody()'s callsites.
llvm-svn: 107771
|
|
|
|
|
|
|
|
| |
of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH.
Makes de-serialization of the function body even more "lazier".
llvm-svn: 107768
|
|
|
|
|
|
| |
the buffer arguments and have a special-case for when the buffer arguments are known to be the same address, or when the size is zero.
llvm-svn: 107761
|
|
|
|
|
|
| |
arguments...which are allowed if the access length is 0!
llvm-svn: 107759
|
|
|
|
|
|
| |
IdempotentOperationChecker::PreVisitBinaryOperator.
llvm-svn: 107748
|
|
|
|
|
|
|
| |
making the other switch case unreachable, or sinking the 'continue' into it
doesn't silence this.
llvm-svn: 107745
|
|
|
|
|
|
| |
consider them for warnings.
llvm-svn: 107741
|
|
|
|
|
|
|
|
| |
SubRegions. Fixes assertion failure
reported in PR 7572.
llvm-svn: 107738
|
|
|
|
|
|
| |
StaticGlobalSpaceRegion.
llvm-svn: 107731
|
|
|
|
| |
llvm-svn: 107728
|
|
|
|
|
|
| |
null-terminated strings and memory blocks. Currently only checks memcpy(), memmove(), and bcopy(), but this is intended to be expanded soon.
llvm-svn: 107722
|
|
|
|
| |
llvm-svn: 107709
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(-analyzer-idempotent-operation). Finds idempotent and/or tautological operations in a path sensitive context, flagging operations that have no effect or a predictable effect.
Example:
{
int a = 1;
int b = 5;
int c = b / a; // a is 1 on all paths
}
- New IdempotentOperationChecker class
- Moved recursive Stmt functions in r107675 to IdempotentOperationChecker
- Minor refactoring of SVal to allow checking for any integer
- Added command line option for check
- Added basic test cases
llvm-svn: 107706
|
|
|
|
| |
llvm-svn: 107645
|
|
|
|
|
|
| |
expression equals a certain value, use SValuator::EvalEQ and GRState::Assume to see if it can, must, or must not equal that value.
llvm-svn: 107638
|
|
|
|
|
|
| |
argument was non-NULL, and we report where the null assumption came from (like AttrNonNullChecker already did).
llvm-svn: 107633
|
|
|
|
|
|
| |
unimplemented. A VLA region's sizeof value matches its extent.
llvm-svn: 107611
|
|
|
|
| |
llvm-svn: 107603
|
|
|
|
|
|
|
|
|
|
| |
regions that may not be known at compile-time (such as those created by malloc). This replaces the old setExtent/getExtent API on Store, which used the GRState's GDM to store SVals.
Also adds a getKnownValue() method to SValuator, which gets the integer value of an SVal if it is known to only have one possible value. There are more places in the code that could be using this, but in general we want to be dealing entirely in SVals, so its usefulness is limited.
The only visible functionality change is that extents are now honored for any DeclRegion, such as fields and Objective-C ivars, rather than just variables. This shows up in bounds-checking and cast-size-checking.
llvm-svn: 107577
|
|
|
|
|
|
|
|
|
|
|
| |
non-static global variables
when calling a function/method whose impact on global variables we cannot accurately estimate.
This change introduces two new MemSpaceRegions that divide up the memory space of globals, and causes
RegionStore and BasicStore to consult a binding to the NonStaticGlobalsMemSpaceRegion when lazily
determining the value of a global.
llvm-svn: 107423
|
|
|
|
|
|
| |
the current statement around everywhere. Preparation for symbolic extents.
llvm-svn: 107422
|
|
|
|
| |
llvm-svn: 107388
|
|
|
|
|
|
| |
this time actually used the cached checker list when calling back to Checker visit methods. This reduces the analysis time for sqlite3.c by 8%.
llvm-svn: 107259
|
|
|
|
|
|
| |
don't crash if we do a funny thing like ((int)ptr)&1. Fixes PR7527.
llvm-svn: 107236
|
|
|
|
|
|
|
| |
be true if some paths were aborted because they exceeded
the maximum loop unrolling count.
llvm-svn: 107209
|
|
|
|
| |
llvm-svn: 107012
|
|
|
|
|
|
| |
SimpleSValuator::EvalBinOpLL().
llvm-svn: 106992
|
|
|
|
|
|
| |
constraints. Part of PR7491.
llvm-svn: 106972
|
|
|
|
| |
llvm-svn: 106964
|