| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 256885
|
| |
|
|
|
|
|
|
|
| |
This checker has not been updated to work with interprocedural analysis,
and actually contains both logical correctness issues but also
memory bugs. We can resuscitate it from version control once there
is focused interest in making it a real viable checker again.
llvm-svn: 198476
|
| |
|
|
|
|
|
| |
This patch tries to avoid unrelated changes other than fixing a few
hyphen-related ambiguities in nearby lines.
llvm-svn: 196466
|
| |
|
|
| |
llvm-svn: 162588
|
| |
|
|
|
|
| |
rdar://10736625
llvm-svn: 149662
|
| |
|
|
|
|
| |
IdempotentOperationsChecker to the 'experimental' category. Fixes <rdar://problem/10146347>.
llvm-svn: 148533
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
type is a pointer to const. (radar://10595327)
The regions corresponding to the pointer and reference arguments to
a function get invalidated by the calls since a function call can
possibly modify the pointed to data. With this change, we are not going
to invalidate the data if the argument is a pointer to const. This
change makes the analyzer more optimistic in reporting errors.
(Support for C, C++ and Obj C)
llvm-svn: 147002
|
| |
|
|
| |
llvm-svn: 144946
|
| |
|
|
|
|
| |
remove -analyzer-purge=none. (Small refactor as well: move the work of constructing AnalysisManager from the callers to the class itself.)
llvm-svn: 140838
|
| |
|
|
|
|
| |
be the common root package.
llvm-svn: 136835
|
| |
|
|
|
|
| |
driver. Also remove associated tests. Sorry for the messy commits; this is the result of a botched Git merge.
llvm-svn: 136422
|
| |
|
|
|
|
| |
DeadStores checker into the "deadcode" group.
llvm-svn: 127531
|
| |
|
|
|
|
| |
misnomer award.
llvm-svn: 126676
|
| |
|
|
| |
llvm-svn: 126623
|
| |
|
|
|
|
| |
have any checkers associated with it anymore.
llvm-svn: 126440
|
| |
|
|
| |
llvm-svn: 125611
|
| |
|
|
|
|
| |
dereferences resulting from array accesses.
llvm-svn: 117334
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
-Wtautological-compare instead of -Wsign-compare, which also implies turning
them on by default.
Restoration of r112877.
llvm-svn: 113334
|
| |
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
| |
binary operator for clearer error reporting. Also remove the 'Idempotent operation' prefix in messages; it's redundant since the bug type is the same.
llvm-svn: 109527
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
int test1() {
return;
}
default to an error.
llvm-svn: 108108
|
| |
|
|
| |
llvm-svn: 106456
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
destination type for initialization, assignment, parameter-passing,
etc. The main issue fixed here is that we used rather confusing
wording for diagnostics such as
t.c:2:9: warning: initializing 'char const [2]' discards qualifiers,
expected 'char *' [-pedantic]
char *name = __func__;
^ ~~~~~~~~
We're not initializing a 'char const [2]', we're initializing a 'char
*' with an expression of type 'char const [2]'. Similar problems
existed for other diagnostics in this area, so I've normalized them all
with more precise descriptive text to say what we're
initializing/converting/assigning/etc. from and to. The warning for
the code above is now:
t.c:2:9: warning: initializing 'char *' from an expression of type
'char const [2]' discards qualifiers [-pedantic]
char *name = __func__;
^ ~~~~~~~~
Fixes <rdar://problem/7447179>.
llvm-svn: 100832
|
| |
|
|
|
|
| |
a null dereference results from a field access.
llvm-svn: 99236
|
| |
|
|
| |
llvm-svn: 95348
|
| |
|
|
|
|
|
|
|
| |
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).
llvm-svn: 91446
|
| |
|
|
| |
llvm-svn: 91272
|
| |
|
|
|
|
| |
was dereferenced. Addresses <rdar://problem/7039161>.
llvm-svn: 89726
|
| |
|
|
|
|
| |
variants instead of using llvm::cl::init(true) arguments.
llvm-svn: 89315
|
| |
|
|
|
|
|
| |
option enables new "internal" checks that will eventually be turned on
by default but still require broader testing.
llvm-svn: 88671
|
| |
|
|
|
|
| |
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.
llvm-svn: 86430
|
| |
|
|
| |
llvm-svn: 83030
|
| |
|
|
| |
llvm-svn: 79954
|
| |
|
|
|
|
|
| |
OldCastRegion used), and the associated command line option
'-analyzer-store=old-basic-cast'.
llvm-svn: 77509
|
| |
|
|
| |
llvm-svn: 76813
|
| |
|
|
|
|
|
|
|
| |
'Checker' interface. An updated test case illustrates that after calling a
function with the 'nonnull' attribute we now register the fact that the passed
pointer must be non-null. This retention of information was not possible with
the previously used GRSimpleAPICheck interface.
llvm-svn: 76797
|
| |
|
|
| |
llvm-svn: 76610
|
| |
|
|
|
|
|
|
| |
and replace the 'clang-cc' option '-analyzer-store=basic-new-cast' with
'-analyzer-store=basic-old-cast'. We'll keep the old CastRegion implementation
around for a little while for regression testing.
llvm-svn: 75209
|
| |
|
|
|
|
| |
using '-analyzer-store=basic-new-cast'.
llvm-svn: 74865
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GRTransferFuncs had the conflated role of both constructing SVals (symbolic
expressions) as well as handling checker-specific logic. Now SValuator has the
role of constructing SVals from expressions and GRTransferFuncs just handles
checker-specific logic. The motivation is by separating these two concepts we
will be able to much more easily create richer constraint-generating logic
without coupling it to the main checker transfer function logic.
We now have one implementation of SValuator: SimpleSValuator.
SimpleSValuator is essentially the SVal-related logic that was in GRSimpleVals
(which is removed in this patch). This includes the logic for EvalBinOp,
EvalCast, etc. Because SValuator has a narrower role than the old
GRTransferFuncs, the interfaces are much simpler, and so is the implementation
of SimpleSValuator compared to GRSimpleVals. I also did a line-by-line review of
SVal-related logic in GRSimpleVals and cleaned it up while moving it over to
SimpleSValuator.
As a consequence of removing GRSimpleVals, there is no longer a
'-checker-simple' option. The '-checker-cfref' did everything that option did
but also ran the retain/release checker. Of course a user may not always wish to
run the retain/release checker, nor do we wish core analysis logic buried in the
checker-specific logic. The next step is to refactor the logic in CFRefCount.cpp
to separate out these pieces into the core analysis engine.
llvm-svn: 74229
|
| |
|
|
|
|
|
| |
'==' and '!=' (some code in the '!=' was not replicated in the '==' code,
causing some constraints to get lost).
llvm-svn: 70885
|
| |
|
|
| |
llvm-svn: 70883
|
| |
|
|
| |
llvm-svn: 70614
|