| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 114318
|
| |
|
|
| |
llvm-svn: 114316
|
| |
|
|
|
|
|
|
| |
assertion failure
on code containing GNU statement expressions reported in PR 8141.
llvm-svn: 113953
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
can be used as
the index when the value evaluation isn't powerful enough. By creating ElementRegions with
UnknownVals as the index, this gives the false impression that they are the same element, when
they really aren't. This becomes really problematic when deriving symbols from these regions
(e.g., those representing the initial value of the index), since two different indices will
get the same symbol for their binding.
This fixes an issue with the idempotent operations checker that would cause two indices that
are clearly not the same to make it appear as if they always had the same value.
Fixes <rdar://problem/8431728>.
llvm-svn: 113920
|
| |
|
|
|
|
|
|
| |
the size of a VLA. We don't track VLA extents yet,
but we should at least not crash. Fixes <rdar://problem/8424269>.
llvm-svn: 113888
|
| |
|
|
| |
llvm-svn: 113826
|
| |
|
|
|
|
| |
up <rdar://problem/6352035>.
llvm-svn: 113612
|
| |
|
|
|
|
| |
mutex can be nil
llvm-svn: 113573
|
| |
|
|
|
|
| |
statistics about analysis. Running clang with the -analyzer-stats flag will emit warnings containing the information. We can then run a postanalysis script to take this data and give useful information about how much the analyzer missed in a project.
llvm-svn: 113568
|
| |
|
|
|
|
|
| |
value in a function call.
Fixes: <rdar://problem/8409480> “warning: Pass-by-value argument in function call is undefined” message can be improved
llvm-svn: 113554
|
| |
|
|
|
|
|
|
|
|
| |
trimmed graph (in BugReporter). This fixes a problem where a leak that happened to occur on both an exit() path and a non-exit() path was getting reported with the exit() path (which users don't care about).
This fixes:
<rdar://problem/8331641> leak reports should not show paths that end with exit() (but ones that don't end with exit())
llvm-svn: 113524
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The end result is now we eagarly constant-fold symbols in the analyzer that are perfectly constrained
to be a constant value. This allows us to recover some path-sensitivity in some cases by lowering
the required level of reasoning power needed to evaluate some expressions.
The net win from this change is that the false positive in PR 8015 is fixed, and we also
find more idempotent operations bugs.
We do, however, regress with the BugReporterVisitors, which need to be modified to understand
this constant folding (and look past it). This causes some diagnostic regressions in plist-output.m
which will get addressed in a future patch. plist-output.m is now marked XFAIL, while
plist-output-alternate.m now tests that the plist output is working, but with the suboptimal
diagnostics. This second test file will eventually be removed.
llvm-svn: 113477
|
| |
|
|
| |
llvm-svn: 113458
|
| |
|
|
|
|
|
|
|
| |
-Wtautological-compare instead of -Wsign-compare, which also implies turning
them on by default.
Restoration of r112877.
llvm-svn: 113334
|
| |
|
|
|
|
| |
dependencies.
llvm-svn: 113301
|
| |
|
|
|
|
| |
and simplify surrounding checking logic.
llvm-svn: 113282
|
| |
|
|
|
|
| |
added a test case.
llvm-svn: 113269
|
| |
|
|
|
|
|
| |
which is should have done from the beginning. As usual, the most
fun with this sort of change is updating all the testcases.
llvm-svn: 113090
|
| |
|
|
|
|
|
|
|
| |
type" warning.
The rationale behind this is that it is normal for callback functions to have a non-void return type
and it should still be possible to mark them noreturn. (JavaScriptCore is a good example of this).
llvm-svn: 112918
|
| |
|
|
|
|
| |
experiment in a few days.
llvm-svn: 112882
|
| |
|
|
|
|
|
| |
to -Wtautological-compare. This implies that they're now on by default.
If this causes chaos, I'll figure something else out.
llvm-svn: 112877
|
| |
|
|
|
|
| |
index constraints in this case.
llvm-svn: 112794
|
| |
|
|
|
|
| |
AssignE. Now StoreE (const Stmt*) represents the expression where the store took place, which is the assignment expression if it takes place in an assignment. This removes some conceptual dissidence as well as removes an extra parameter from the Checker::PreVisitBind() visitor. It also improves ranges and source location information in analyzer diagnostics.
llvm-svn: 112789
|
| |
|
|
|
|
| |
indices should exactly resolve over multiple index possibilities (and thus suppress the false positive in the test).
llvm-svn: 112770
|
| |
|
|
|
|
| |
valid range and not just a single constant.
llvm-svn: 112769
|
| |
|
|
|
|
| |
case for follow-on work). This patch adds a bandaid for RegionStore's limited reasoning about symbolic array values.
llvm-svn: 112766
|
| |
|
|
|
|
| |
function's address. Fixes PR 8052.
llvm-svn: 112761
|
| |
|
|
|
|
| |
type. Fixes PR 8050.
llvm-svn: 112738
|
| |
|
|
|
|
|
| |
it the same as CallExprs.
Fixes: <rdar://problem/8375510> [Boost] CFGBuilder crash in Boost.Graph
llvm-svn: 112618
|
| |
|
|
| |
llvm-svn: 112580
|
| |
|
|
|
|
| |
CXXOperatorCallExpr. Fixes a Boost.Graph crasher.
llvm-svn: 112578
|
| |
|
|
|
|
|
|
|
|
| |
- Fixed a regression where assigning '0' would be reported
- Changed the way self assignments are filtered to allow constant testing
- Added a test case for assign ops
- Fixed one test case where a function pointer was not considered constant
- Fixed test cases relating to 0 assignment
llvm-svn: 112501
|
| |
|
|
|
|
| |
updated test cases flagged by it.
llvm-svn: 112313
|
| |
|
|
|
|
|
|
|
|
|
| |
increase the coverage of bugs. Primarily affects IdempotentOperationChecker.
- Migrated a temporarily separated test back to its original file (bug has been fixed, null-deref-ps-temp.c -> null-deref-ps.c)
- Changed SymbolManager to use relaxed LiveVariables
- Updated several test cases that the IdempotentOperationChecker class now flags
- Added test case to test relaxed LiveVariables use by the IdempotentOperationChecker
llvm-svn: 112312
|
| |
|
|
|
|
| |
statements would cause the path to get prematurely aborted. Fixes <rdar://problem/8360854>.
llvm-svn: 112233
|
| |
|
|
|
|
|
|
|
|
| |
- Removed the assumption that __block vars are all non-constant
- Simplified some repetitive code in RunAnalysis
- Added block walking support
- Code/comments cleanup
- Separated out test for block pseudoconstants
llvm-svn: 112098
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Added wasReferenced function to PseudoConstantAnalysis to determine if a variable was ever referenced in a function (outside of a self-assignment)
- BlockDeclRefExpr referenced variables are now explicitly added to the non-constant list
- Remove unnecessary ignore of implicit casts
- Generalized parameter self-assign detection to detect deliberate self-assigns of variables to avoid unused variable warnings
- Updated test cases with deliberate self-assignments
- Fixed bug with C++ references and pseudoconstants
- Added test case for C++ references and pseudoconstants
llvm-svn: 111965
|
| |
|
|
|
|
| |
line
llvm-svn: 111833
|
| |
|
|
|
|
|
|
|
|
|
|
| |
IdempotentOperationChecker uses it.
- Psuedo -> Pseudo (doh...)
- C++ reference support
- Added pseudoconstant test case for __block vars
- Separated out static local checking from pseudoconstant analysis and generalized to non-local checking
- Added missing test cases for storage false positives
llvm-svn: 111832
|
| |
|
|
|
|
| |
Fixes PR7945.
llvm-svn: 111602
|
| |
|
|
|
|
| |
non-void result. (<rdar://problem/7562925>)
llvm-svn: 111492
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
reduction stage in IdempotentOperationChecker.
- Renamed IdempotentOperationChecker::isConstant to isConstantOrPseudoConstant to better reflect the function
- Changed IdempotentOperationChecker::PreVisitBinaryOperator to only run 'CanVary' once on undefined assumptions
- Created new PsuedoConstantAnalysis class and added it to AnalysisContext
- Changed IdempotentOperationChecker to exploit the new analysis
- Updated tests with psuedo-constants
- Added check to IdempotentOperationChecker to see if a Decl is const qualified
llvm-svn: 111426
|
| |
|
|
|
|
|
|
| |
beginning of a do...while loop. This would cause
the body of the DoStmt to be disconnected from the preceding code.
llvm-svn: 111283
|
| |
|
|
|
|
| |
some test cases.
llvm-svn: 111190
|
| |
|
|
|
|
|
|
| |
- Fix memcpy() and friends to actually invalidate the destination buffer.
- Emit a different message for out-of-bounds buffer accesses if the buffer is being written to.
- When conjuring symbols, let ValueManager figure out the type.
llvm-svn: 111120
|
| |
|
|
|
|
|
|
|
|
| |
for the purpose of bounds-checking.
- Rewrite GRState::AssumeInBound to actually do that checking, and to use the normal constraint path.
- Remove ConstraintManager::AssumeInBound.
- Teach RegionStore and FlatStore to ignore those regions for now.
llvm-svn: 111116
|
| |
|
|
|
|
| |
region change callback. Now does basic tracking of string length for general regions. Currently this is still only used for modeling strlen().
llvm-svn: 111081
|
| |
|
|
| |
llvm-svn: 111079
|
| |
|
|
|
|
|
|
|
| |
- Unfinished analysis may still report valid warnings if the path was completely analyzed
- New 'CanVary' heuristic to recursively determine if a subexpression has a varying element
- Updated test cases, including one known bug
- Exposed GRCoreEngine through GRExprEngine
llvm-svn: 110970
|
| |
|
|
|
|
| |
reduced to a constant.
llvm-svn: 110592
|