summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/uninit-vals-ps.c
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Improve tracing for uninitialized struct fieldsGeorge Karpenkov2018-08-291-157/+0
| | | | | | | | rdar://13729267 Differential Revision: https://reviews.llvm.org/D51323 llvm-svn: 340986
* [analyzer] Clarify 'uninitialized function argument' messagesDaniel Marjamaki2017-03-081-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D30341 llvm-svn: 297283
* Reland 4: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-03-031-1/+1
| | | | | | | | | | | | | | constraint managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296895
* Revert "Reland 3: [analyzer] NFC: Update test infrastructure to support ↵Dominic Chen2017-03-021-1/+1
| | | | | | | | multiple constraint managers" This reverts commit ea36f1406e1f36bf456c3f3929839b024128e468. llvm-svn: 296841
* Reland 3: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-03-021-1/+1
| | | | | | | | | | | | | | constraint managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296837
* Revert "Reland 2: [analyzer] NFC: Update test infrastructure to support ↵Dominic Chen2017-03-021-1/+1
| | | | | | | | multiple constraint managers" This reverts commit f93343c099fff646a2314cc7f4925833708298b1. llvm-svn: 296836
* Reland 2: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-03-021-1/+1
| | | | | | | | | | | | | | constraint managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296835
* Revert "Reland: [analyzer] NFC: Update test infrastructure to support ↵Dominic Chen2017-02-281-1/+1
| | | | | | | | multiple constraint managers" This reverts commit 1b28d0b10e1c8feccb971abb6ef7a18bee589830. llvm-svn: 296422
* Reland: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-02-281-1/+1
| | | | | | | | | | | | | | constraint managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296414
* [analyzer] clarify 'result is garbage value' when it is out of boundsDaniel Marjamaki2017-02-271-0/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D28278 llvm-svn: 296326
* Revert "[analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-02-271-1/+1
| | | | | | | | constraint managers" This reverts commit 8e7780b9e59ddaad1800baf533058d2c064d4787. llvm-svn: 296317
* [analyzer] NFC: Update test infrastructure to support multiple constraint ↵Dominic Chen2017-02-271-1/+1
| | | | | | | | | | | | | | managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296312
* [analyzer] Don't warn for returning void expressions in void blocks.Jordan Rose2013-04-171-1/+16
| | | | | | | | | | | This was slightly tricky because BlockDecls don't currently store an inferred return type. However, we can rely on the fact that blocks with inferred return types will have return statements that match the inferred type. <rdar://problem/13665798> llvm-svn: 179699
* [analyzer] Do not report use of undef on "return foo();" when the return ↵Anna Zaks2012-09-121-0/+12
| | | | | | | | type is void. Fixes a false positive found by analyzing LLVM code base. llvm-svn: 163750
* Really remove FlatStoreManager and BasicStoreManager, this time from the ↵Ted Kremenek2011-07-281-1/+0
| | | | | | driver. Also remove associated tests. Sorry for the messy commits; this is the result of a botched Git merge. llvm-svn: 136422
* [analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best ↵Argyrios Kyrtzidis2011-02-281-2/+2
| | | | | | misnomer award. llvm-svn: 126676
* [analyzer] Migrate UndefResultChecker to CheckerV2.Argyrios Kyrtzidis2011-02-281-2/+2
| | | | llvm-svn: 126614
* Clean up obtuse wording of checker diagnostic of using an uninitialized ↵Ted Kremenek2010-09-091-1/+1
| | | | | | | 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
* Rename -cc1 option '-checker-cfref' to '-analyzer-check-objc-mem'.Ted Kremenek2010-02-051-2/+2
| | | | llvm-svn: 95348
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-2/+2
| | | | | | | | | - 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
* Replace clang-cc with clang -cc1.Zhongxing Xu2009-12-141-2/+2
| | | | llvm-svn: 91272
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-1/+1
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* Shorten the static analyzer diagnostic for 'use of garbage value'.Ted Kremenek2009-09-241-3/+3
| | | | llvm-svn: 82672
* Have divide-by-zero checker not handled undefined denominators. This is ↵Ted Kremenek2009-09-161-3/+3
| | | | | | handled by the generic checking for undefined operands for BinaryOperators. llvm-svn: 82019
* Introduce "DefinedOrUnknownSVal" into the SVal class hierarchy, providing a wayTed Kremenek2009-09-111-4/+4
| | | | | | | | | | | | to statically type various methods in SValuator/GRState as required either a defined value or a defined-but-possibly-unknown value. This leads to various logic cleanups in GRExprEngine, and lets the compiler enforce via type checking our assumptions about what symbolic values are possibly undefined and what are not. Along the way, clean up some of the static analyzer diagnostics regarding the uses of uninitialized values. llvm-svn: 81579
* Remove 'StoreManager::OldCastRegion()', TypedViewRegion (which onlyTed Kremenek2009-07-291-1/+0
| | | | | | | OldCastRegion used), and the associated command line option '-analyzer-store=old-basic-cast'. llvm-svn: 77509
* Fix PR 4631. The compound initializers of unions were not being evaluated, whichTed Kremenek2009-07-281-0/+22
| | | | | | | | | could cause false positives if any the subexpressions had side-effects. These initializers weren't evaluated because the StoreManager would need to handle them, but that's an orthogonal problem of whether or not the StoreManager can handle the binding. llvm-svn: 77361
* Fix regression in attribute 'nonnull' checking when a transition nodeTed Kremenek2009-07-281-0/+18
| | | | | | was created but not added to the destination NodeSet. This fixes PR 4630. llvm-svn: 77353
* Switch BasicStoreManager to use the new CastRegion implementation by default,Ted Kremenek2009-07-101-1/+1
| | | | | | | | 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
* Make 'BasicStoreManager' + 'NewCastRegion' testable from the command line ↵Ted Kremenek2009-07-061-1/+2
| | | | | | using '-analyzer-store=basic-new-cast'. llvm-svn: 74865
* Enhance diagnostics value tracking logic for null dereferences and ↵Ted Kremenek2009-05-131-1/+1
| | | | | | uninitialized values. llvm-svn: 71700
* Add a few more analyzer test cases.Ted Kremenek2009-04-021-0/+15
| | | | llvm-svn: 68326
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-2/+2
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Fix PR3509 by providing correct starting locations for initializer listsDouglas Gregor2009-03-011-1/+1
| | | | llvm-svn: 65777
* Static Analyzer driver/options (partial) cleanup:Ted Kremenek2009-02-171-1/+1
| | | | | | | | | | | | | | - 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 llvm-svn: 64737
* Add -analyze action to run static analyzer, instead of inferring fromDaniel Dunbar2009-01-201-2/+2
| | | | | | individual checker options. llvm-svn: 62634
* Fix <rdar://problem/6451816>:Ted Kremenek2008-12-171-2/+20
| | | | | | | | | | | | | | | | - Because of the introduction of AnonTypedRegions when reasoning about casts, we had a regression in the "symbolication" of variable values passed-by-reference to a function. This is now fixed in CFRefCount.cpp (-checker-cfref) by blasting through the layer of AnonTypedRegions when symbolicating the value of the variable. This logic may get moved elsewhere. Note that this change affects only -checker-cfref and not -checker-simple; eventually this logic should get pulled out of CFRefCount.cpp into a more common place. All users use -checker-cfref by default, and -checker-simple should probably just be removed. - Updated test 'Analysis/uninit-vals-ps.c' to only use -checker-cfref and added a test case for this regression. llvm-svn: 61147
* Add checker test case: warn about returning an uninitialized value to the ↵Ted Kremenek2008-11-211-0/+7
| | | | | | caller. llvm-svn: 59765
* Enable test file for 'region store' in addition to basic store.Ted Kremenek2008-11-211-1/+2
| | | | llvm-svn: 59762
* Split region store specific test cases.Zhongxing Xu2008-11-201-17/+0
| | | | llvm-svn: 59683
* Add test for path-sensitive uninit-val detection involving struct field.Zhongxing Xu2008-11-191-0/+18
| | | | llvm-svn: 59620
* Fixed bug in the transfer function for dereferences: the loaded value from ↵Ted Kremenek2008-05-211-0/+8
| | | | | | | | | | EvalLoad should bind to the UnaryOperator*, not its subexpression. Added test case to exercise this fix when checking for uses of uninitialized values. Patch by Zhongxing Xu! llvm-svn: 51377
* When reporting branch conditions that evaluate to an uninitialized value,Ted Kremenek2008-05-051-0/+17
| | | | | | | | | | highlight the most nested subexpression that appears most responsible (giving the user better diagnostic feedback). Updated test cases to illustrate this feature. Implements: <rdar://problem/5880443> llvm-svn: 50647
* Added uninitialized-values (path-sensitive) test case as a regression testTed Kremenek2008-04-241-0/+18
for the fix in r50178 (http://llvm.org/viewvc/llvm-project?rev=50178&view=rev). This fix was for <rdar://problem/5881148>. llvm-svn: 50220
OpenPOWER on IntegriCloud