History log of /external/clang/test/Analysis/null-deref-ps.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/test/Analysis/null-deref-ps.c
cdc3a89d5de90b2299c56f4a46c3de590c5184d1 24-Aug-2012 Ted Kremenek <kremenek@apple.com> Fix analyzer tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
7a0a31ce0cd38147bfe853f71a3f7261444ddf4c 03-Feb-2012 Chad Rosier <mcrosier@apple.com> [frontend] Don't allow a mapping to a warning override an error/fatal mapping.
rdar://10736625

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149662 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
a8180e5a8795b4b80587662167dfc13646a494a1 20-Jan-2012 Ted Kremenek <kremenek@apple.com> Reenable DeadStoresChecker under --analyze, and move the IdempotentOperationsChecker to the 'experimental' category. Fixes <rdar://problem/10146347>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148533 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
2cbe791d3e9b26f30196c4852da75d9ad67b4ad9 20-Dec-2011 Anna Zaks <ganna@apple.com> [analyzer] Do not invalidate arguments when the parameter's
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)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
01f2a1ea4d2b124d83eca82e01a0a7482c2c3614 18-Nov-2011 Anna Zaks <ganna@apple.com> [analyzer] The compiler warning was disabling the analyzer in this test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
d30952838421ddfb9f7e346b2ba8213889a5f789 30-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Add -analyzer-purge option which can take on multiple values, remove -analyzer-purge=none. (Small refactor as well: move the work of constructing AnalysisManager from the callers to the class itself.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
033a07e5fca459ed184369cfee7c90d82367a93a 04-Aug-2011 Ted Kremenek <kremenek@apple.com> [analyzer] rename all experimental checker packages to have 'experimental' be the common root package.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
a4c7a4314ffbe402091695874e93d9b0a79c8099 29-Jul-2011 Ted Kremenek <kremenek@apple.com> Really remove FlatStoreManager and BasicStoreManager, this time from the driver. Also remove associated tests. Sorry for the messy commits; this is the result of a botched Git merge.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
ade3195a201e16e989e9f93a568fb1806519077c 12-Mar-2011 Ted Kremenek <kremenek@apple.com> Re-enable the IdempotentOperations checker for --analyze, and put it and the DeadStores checker into the "deadcode" group.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
c4d2c9074be6eb2091086eddd6c8f052f3b245c8 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best misnomer award.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
bd90076671c8012244bb7e3fd84b6789e47cb199 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Migrate AttrNonNullChecker to CheckerV2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
65d39251ff57b8e33cf6d3a7fcc6aa1c6f8cdc68 24-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove '-analyzer-experimental-internal-checks' flag, it doesn't have any checkers associated with it anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
c9f2e0f286500c7e747849b3aa9c0e67a4dc90d7 15-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Use the new registration mechanism on the IdempotentOperationChecker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
646c3c3beaf71fc64453d766dff22024dd5e0409 26-Oct-2010 Ted Kremenek <kremenek@apple.com> Tweak null dereference checker to give better diagnostics for null dereferences resulting from array accesses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
818b433a943653b329df56bdaa1b18385603d2bd 10-Sep-2010 Ted Kremenek <kremenek@apple.com> Clean up obtuse wording of checker diagnostic of using an uninitialized value in a function call.

Fixes: <rdar://problem/8409480> “warning: Pass-by-value argument in function call is undefined” message can be improved

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
8205c1a5c623a418f06789f222183ed5040ff4c9 08-Sep-2010 John McCall <rjmccall@apple.com> Put the tautological-comparison-of-unsigned-against-zero warnings in
-Wtautological-compare instead of -Wsign-compare, which also implies turning
them on by default.

Restoration of r112877.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
40bfbbc8a56bb1cff136c8cd44ced7e673f21a5e 03-Sep-2010 John McCall <rjmccall@apple.com> sabre points out that the timing here is pretty pessimal; I'll retry the
experiment in a few days.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
51b0a52cc42d5c76ad96cde924c2130e36b46dca 03-Sep-2010 John McCall <rjmccall@apple.com> Experimentally move the tautological comparison warnings from -Wsign-compare
to -Wtautological-compare. This implies that they're now on by default.
If this causes chaos, I'll figure something else out.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112877 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
9edd4d0f73b81baaa7153982bf716949a5b1b926 28-Aug-2010 Tom Care <tom.care@uqconnect.edu.au> Added checking of (x == x) and (x != x) to IdempotentOperationChecker and updated test cases flagged by it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
6d0e6ce200aa06b06f0e9b493ed365bbe2982cee 28-Aug-2010 Tom Care <tom.care@uqconnect.edu.au> Enabled relaxed LiveVariables analysis in the path-sensitive engine to 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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
245adabd97c8c770c13935a9075f2243cc6f1d57 18-Aug-2010 Tom Care <tom.care@uqconnect.edu.au> Added psuedo-constant analysis and integrated it into the false positive 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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
a7a8a450d908b34fa5f569f2e694ebd4b61aae2f 13-Aug-2010 Tom Care <tom.care@uqconnect.edu.au> Improved IdempotentOperationChecker false positives and false negatives.
- 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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
3e5637f8a1c5b3cc3fa9d4e33a5763883ea97fc6 27-Jul-2010 Ted Kremenek <kremenek@apple.com> Finesse 'idempotent operations' analyzer issues to include the opcode of the binary operator for clearer error reporting. Also remove the 'Idempotent operation' prefix in messages; it's redundant since the bug type is the same.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
df4ca423ec7d9b62842e112d1b824faa08b64810 16-Jul-2010 Tom Care <tcare@apple.com> Improved false positive rate for the idempotent operations checker and moved 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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
184aa4e6ded190bfb3bbe207040467f8d7e28a04 12-Jul-2010 Chris Lattner <sabre@nondot.org> fix PR7280 by making the warning on code like this:

int test1() {
return;
}

default to an error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
9a126850968b0aa25f7c6f214e7309e33f2d800a 21-Jun-2010 Jordy Rose <jediknil@belkadan.com> If a nonnull argument evaluates to UnknownVal, don't warn (and don't crash).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106456 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
d4eea8362605807327735727a9098abe1eb23b19 09-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve diagnostics when we fail to convert from a source type to a
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>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
452b84ded735d7e7de6d099953ab959a4c9910f0 23-Mar-2010 Ted Kremenek <kremenek@apple.com> Tweak null dereference diagnostics to give clearer diagnostics when
a null dereference results from a field access.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
565e465c6d0093f1bf8414b2cabdc842022385a9 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-checker-cfref' to '-analyzer-check-objc-mem'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- 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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
ef74f4c6dcd59b3af1de9d8f613c1caf3e6cb63d 14-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Replace clang-cc with clang -cc1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
e576af2754bfa309bb10a518bbc17c81b9e0723f 24-Nov-2009 Ted Kremenek <kremenek@apple.com> Enhance null dereference diagnostics by indicating what variable (if any) was dereferenced. Addresses <rdar://problem/7039161>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
53e8484581ca358c3a2ccd8ea39c136c6e85d606 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Switch -f{builtin,math-errno,rtti} and -analyzer-purge-dead to -...no... variants instead of using llvm::cl::init(true) arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
8382cf57b722f130f1a6b45380639871c07271c1 13-Nov-2009 Ted Kremenek <kremenek@apple.com> Add clang-cc option "--analyzer-experimental-internal-checks". This
option enables new "internal" checks that will eventually be turned on
by default but still require broader testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
4fcfde4d5c8f25e40720972a5543d538a0dcb220 08-Nov-2009 Daniel Dunbar <daniel@zuster.org> Eliminate &&s in tests.
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
f8add9b5f51540e9e734e6a82c5d54c362be822a 29-Sep-2009 Ted Kremenek <kremenek@apple.com> Remove test case's dependency on platform headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83030 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
ac50213ec509063151bc1a9c6b7d71561896cdd5 25-Aug-2009 Ted Kremenek <kremenek@apple.com> Add test case for PR 4759.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79954 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
f7a0cf426eddae76e1a71dd2295631a2cf0560af 29-Jul-2009 Ted Kremenek <kremenek@apple.com> Remove 'StoreManager::OldCastRegion()', TypedViewRegion (which only
OldCastRegion used), and the associated command line option
'-analyzer-store=old-basic-cast'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
f0549e2b5c73d65ce96fc37c9030577997fe19d4 23-Jul-2009 Mike Stump <mrs@apple.com> Prep for new warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
c26a8b06e255bc7a8eb3f5df22e32b62a3dbf4c0 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Migrate the path-sensitive checking of 'nonnull' arguments over to the new
'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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
339d52a8ddcb345275ec48c7bab849a8943fa9f5 21-Jul-2009 Mike Stump <mrs@apple.com> Prep for new warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
c037eac3bda3c636c961aab6377beea3242e81e4 10-Jul-2009 Ted Kremenek <kremenek@apple.com> Switch BasicStoreManager to use the new CastRegion implementation by default,
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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
e1cea75e70d76f55157749a7bcad319050492945 06-Jul-2009 Ted Kremenek <kremenek@apple.com> Make 'BasicStoreManager' + 'NewCastRegion' testable from the command line using '-analyzer-store=basic-new-cast'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
6c07bdba93b095b66e2c8c82dd5ed458fa8285ea 26-Jun-2009 Ted Kremenek <kremenek@apple.com> Introduce a new concept to the static analyzer: SValuator.

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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
65d80fd4acfe65400b7ad594042adc08e972c405 04-May-2009 Ted Kremenek <kremenek@apple.com> Fix false positive null dereference by unifying code paths in GRSimpleVals for
'==' and '!=' (some code in the '!=' was not replicated in the '==' code,
causing some constraints to get lost).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
1308f573d7a9840713879deb3c02b219197cd827 04-May-2009 Ted Kremenek <kremenek@apple.com> Update test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70883 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
935022a9aebb32459fd56ccfb1e1cfb9c0a5176c 02-May-2009 Ted Kremenek <kremenek@apple.com> Add another null pointer check test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
2c0ccd045514ae4dc951fb45b7c29216ba109bf7 30-Apr-2009 Steve Naroff <snaroff@apple.com> Warn about invalid return statements by default.

This fixes <rdar://problem/6839489> 10A345: Clang does not warm about mismatched returns (void return from a bool function)

Will implement -Wreturn-type, -Wno-return-type in another commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
d7d5f0223bd30dfd618762349c6209dd1d5ea3e6 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Rename clang to clang-cc.

Tests and drivers updated, still need to shuffle dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
efcfcc0e27ade4e0bb6626824f2bdc0a01bab32b 05-Mar-2009 Ted Kremenek <kremenek@apple.com> GRExprEngine: Polish up handling of casting integer constants to pointers and back.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
be1fe1eb12a1cb91c8e3a9fcc2db4dfe989def6c 17-Feb-2009 Ted Kremenek <kremenek@apple.com> Static Analyzer driver/options (partial) cleanup:
- Move all analyzer options logic to AnalysisConsumer.cpp.
- Unified specification of stores/constraints/output to be:
-analyzer-output=...
-analyzer-store=...
-analyzer-constraints=...
instead of -analyzer-range-constraints, -analyzer-store-basic, etc.
- Updated drivers (ccc-analyzer, scan-builds, new ccc) to obey this new
interface
- Updated test cases to conform to new driver options


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
9800dadea77ad62450fc37268eb9778be2f86d06 16-Feb-2009 Ted Kremenek <kremenek@apple.com> Test passes with -analyzer-range-contraints.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
bcd2f76edbd1bcf966183444d5d1afcc1edc050d 06-Feb-2009 Zhongxing Xu <xuzhongxing@gmail.com> Put the region store specific test in a separate file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
a48f7378a05095595d0f6a9c11fc8141e7a5ea61 06-Feb-2009 Zhongxing Xu <xuzhongxing@gmail.com> Create ElementRegion when the base is SymbolicRegion. This is like what we do
for FieldRegion. This enables us to track more values.

Simplify SymbolicRegion::getRValueType(). We assume the symbol always has
pointer type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
19e8744c4886d338404cf4b8e2f1c15684793cc3 22-Jan-2009 Ted Kremenek <kremenek@apple.com> Enhance test case to test RegionStore with -checker-cfref.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
d427023c334fe03105d9359711a3df4d6f23b344 21-Jan-2009 Daniel Dunbar <daniel@zuster.org> Add -analyze action to run static analyzer, instead of inferring from
individual checker options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
72afb3739da0da02158242ae41a50cfe0bea78b4 17-Jan-2009 Ted Kremenek <kremenek@apple.com> Fix analyzer crash found when scanning Wine sources where the analyzer used old logic to determine the value of a switch 'case' label.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
e1c2a675e0c089e1f53cbd55d2197a8beaa852ae 13-Jan-2009 Ted Kremenek <kremenek@apple.com> static analyzer: Handle casts from arrays to integers. This fixes PR 3297.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
ff944a8c481d6c0f1ad2633e4be9bf8b1dd2a09f 22-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add an option to make 'RemoveDeadBindings' a configurable behavior. This enables
us to measure the effect of this optimization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
4193eca10ce0cc8b2dae887e935a43b26f492b5b 20-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Lazy bingding for region-store manager.
* Now Bind() methods take and return GRState* because binding could
also alter GDM.
* No variables are initialized except those declared with initial
values.
* failed C test cases are due to bugs in RemoveDeadBindings(),
which removes constraints that is still alive. This will be fixed in later
patch.
* default value of array and struct regions will be implemented in later patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
a317e90f4c4aeb871359c3b8c3420f1ddab97d5c 04-Dec-2008 Ted Kremenek <kremenek@apple.com> Add 'expected-warning' to make test case pass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
1e10011aa27d322d1290fc04d2372bf8719c645b 04-Dec-2008 Ted Kremenek <kremenek@apple.com> Add another static analyzer test case involving attribute(nonnull).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
a96ac060debe3b83caa5c4ddba0c44a44b4499fe 04-Dec-2008 Ted Kremenek <kremenek@apple.com> Add another test case for attribute(nonnull) checking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
d7ff4874cbb99b5a8a92121af18792204b210dbb 03-Dec-2008 Ted Kremenek <kremenek@apple.com> BasicConstraintManager:
- Fix nonsensical logic in AssumeSymGE. When comparing 'sym >= constant' and the
constant is the maximum integer value, add the constraint that 'sym ==
constant' when the path is deemed feasible. All other cases are feasible.
- Improve AssumeSymGT. When comparing 'sym > constant' and constant is the
maximum integer value we know the path is infeasible.
- Add test case for this enhancement to AssumeSymGT.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
73abd133aeda75971212176b1b4f7f251976d7cf 03-Dec-2008 Ted Kremenek <kremenek@apple.com> BasicConstraintManager:
- Fix nonsensical logic in AssumeSymLE. When comparing 'sym <= constant' and the
constant is the minimum integer value, add the constraint that 'sym ==
constant' when the path is deemed feasible. All other cases are feasible.
- Improve AssumeSymLT to address <rdar://problem/6407949>. When comparing
'sym < constant' and constant is the minimum integer value we know the
path is infeasible.
- Add test case for <rdar://problem/6407949>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
973e72a8ddbf1645ce8da4d22c60babbdb9b5f79 15-Nov-2008 Ted Kremenek <kremenek@apple.com> Add a test case for compound assignments that lazily symbolicate the value of the LHS when the computation type is an integer of more bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
12b49d9293b3bc730c127ac3645c70f581c9caf7 11-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add && to test command.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
fe81bc215e823e57b5a6dfb92fe0363c9bd07c46 10-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add region store model to path-sensitive testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
dacd67a377f6f3d4bfd754d69b0a070e4a61baab 18-Oct-2008 Ted Kremenek <kremenek@apple.com> This test now passes again.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
3397e467f5f20fb0c54fc1a30f99c2559661938a 17-Oct-2008 Ted Kremenek <kremenek@apple.com> Mark these tests XFAIL. We need to add back assumption logic when doing array and field accesses.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57658 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
cafd9089a4745414eedb93d0b543d9d22c6b55ae 24-Sep-2008 Ted Kremenek <kremenek@apple.com> Updated test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
0a41e5a03a2753e736dece6fc6847e6de2dedec1 19-Sep-2008 Ted Kremenek <kremenek@apple.com> Fixed logic error in BasicConstraintManager pointed out by Zhongxing Xu.

For checking if a symbol >= value, we need to check if symbol == value || symbol
> value. When checking symbol > value and we know that symbol != value, the path
is infeasible only if value == maximum integer.

For checking if a symbol <= value, we need to check if symbol == value || symbol
< value. When checking symbol < value and we know that symbol != value, the path
is infeasible only if value == minimum integer.

Updated test case exercising this logic: we only prune paths if the values are
unsigned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
f6e5ec45950df60555ee96c62b728b485394e34e 18-Sep-2008 Ted Kremenek <kremenek@apple.com> Add path-sensitivity test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
e2b00834749b685f8023c3984632d775c1550da3 17-Sep-2008 Ted Kremenek <kremenek@apple.com> Fix copy-paste error in test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
8c3e7fbae6f61f87000f1edd59bb2379abf3d7e0 17-Sep-2008 Ted Kremenek <kremenek@apple.com> Minor pass-sensitivity improvement:
if we know that 'len != 0' and know that 'i == 0' then we know that
'i < len' must evaluate to true and cannot evaluate to false


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
7fb43c17eb2b4102f40a80a355629aacd70589ad 01-Sep-2008 Ted Kremenek <kremenek@apple.com> Tidy up sema processing of attribute "nonull":
- warn about nonnull being applied to functions with no pointer arguments
- continue processing argument list in the attribute when we encounter a non-pointer parameter being marked as nonnull
- when no argument list is specified, only mark pointers as nonnull. This fixes PR 2732 and radar 6188814.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
dd463b8db0b07d2fdb99ffc7a7eb28eeb449c5d4 16-Aug-2008 Ted Kremenek <kremenek@apple.com> Enhance null-dereference checker test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
4489fe10fa073eb326e2c8906db170f009050911 05-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add EXTWARN Diagnostic class.
- Like EXTENSION but always generates a warning (even without
-pedantic).
- Updated ptr -> int, int -> ptr, and incompatible cast warnings to
be EXTWARN.
- Other EXTENSION level diagnostics should be audited for upgrade.
- Updated several test cases to fix code which produced unanticipated
warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
22bda887aacd0e591978541a799aa43835652ec9 31-Jul-2008 Ted Kremenek <kremenek@apple.com> Enhanced path-sensitive return-of-stack-address check to print out the name of the variable whose address was returned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
584def7364f51e35bfcaf5c3c64673096533adda 22-Jul-2008 Ted Kremenek <kremenek@apple.com> Added path-sensitive checking for null pointer values passed to function arguments marked nonnull.
This implements <rdar://problem/6069935>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
e2013f5646cb4a09b71e2708fbe9f8df43f5d7d6 30-Apr-2008 Ted Kremenek <kremenek@apple.com> Added test case to test null dereference checking with lval::ArrayOffset.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50454 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
a548846b471f7ca05ec6038c7d9d3b4d0de777cc 22-Apr-2008 Ted Kremenek <kremenek@apple.com> Added lval type (and tracking) for StringLiterals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
0fe33bc94a822e315585e5cde1964d3c3b9052f9 22-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "nonlval::LValAsInteger" to represent abstract LVals casted to integers, allowing us to track lvals when they are casted back to pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
9704eacf27608cf3549014dd198b0f1148a4a3a0 22-Apr-2008 Ted Kremenek <kremenek@apple.com> Added null dereference test involving arrays.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
3603d736a71971d38d280f470589d5bed8b244bc 22-Apr-2008 Ted Kremenek <kremenek@apple.com> Added missing expected-warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
b9ab690786f0edfe32798bbf4338cab23e08bc6e 22-Apr-2008 Ted Kremenek <kremenek@apple.com> Added null dereference test case looking for null dereferences involving MemberExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
d71ed26dd80cdfebb5bb49000cce538e6c9a90e3 11-Apr-2008 Ted Kremenek <kremenek@apple.com> Refactored all logic to run the GRSimpleVals and CFRef checker into a common
code path in the clang driver.

Renamed options --grsimple to -checker-simple and -check-cfref to -checker-cfref.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c
2f54af48219e4b633346249f318c3536fe76cf14 02-Apr-2008 Ted Kremenek <kremenek@apple.com> Added path-sensitive null dereference test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/null-deref-ps.c