History log of /external/clang/test/Sema/uninit-variables.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9e7617220135a6f6226cf09cb242cc1b905aedb4 13-Oct-2011 Ted Kremenek <kremenek@apple.com> Tweak -Wuninitialized's handling of 'int x = x' to report that as the root cause of an uninitialized variable IFF there are other uses of that uninitialized variable. Fixes <rdar://problem/9259237>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
aa2176b4cd1115adb29f29eca3e6e2fc6d543170 07-Oct-2011 Ted Kremenek <kremenek@apple.com> r141345 also fixed a -Wuninitialized bug where loop conditions were not always flagged as being uninitialized. Addresses <rdar://problem/9432305>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
c5f740ecdbc21d5ba08f97b89cc05c9d4f230fda 07-Oct-2011 Ted Kremenek <kremenek@apple.com> Fix infinite loop in -Wuninitialized reported in PR 11069.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
4f4f349208b2b2307454e169ac7b039e989f003f 10-Sep-2011 David Blaikie <dblaikie@gmail.com> Show either a location or a fixit note, not both, for uninitialized variable warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
6f27542da8843b5c1c579b86e342385bcc43d5f0 02-Sep-2011 Ted Kremenek <kremenek@apple.com> -Wuninitialized: fix insidious bug resulting from interplay of blocks and dead code. Fixes <rdar://problem/10060250>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
540dda6f2e4982b3eab0300c804345f5b6104c11 23-Aug-2011 Ted Kremenek <kremenek@apple.com> Fix regression in -Wuninitialized involving VLAs. It turns out that we were modeling sizeof(VLAs)
incorrectly in the CFG, and also the static analyzer. This patch regresses the analyzer a bit, but
that needs to be followed up with a better solution.

Fixes <rdar://problem/10008112>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
d837c0dc361a000b951593eaaa80c46b73d15b1d 22-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Move duplicate uninitialized warning suppression into the
AnalysisBasedWarnings Sema layer and out of the Analysis library itself.
This returns the uninitialized values analysis to a more pure form,
allowing its original logic to correctly detect some categories of
definitely uninitialized values. Fixes PR10358 (again).

Thanks to Ted for reviewing and updating this patch after his rewrite of
several portions of this analysis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
62d126e942f9f420c6f398d32deb914d413226a3 19-Jul-2011 Ted Kremenek <kremenek@apple.com> Fix false negative in -Wuninitialized involving a () wrapping an lvalue-to-rvalue conversion in a DeclStmt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
d626ec404fd0f27244363200f1a85a7db219cd11 19-Jul-2011 Ted Kremenek <kremenek@apple.com> Fix assertion failure in UninitializedValues.cpp where an lvalue to rvalue conversion is wrapped in a parenthesis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135519 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
8435069798b5621615f9f65c471c7e7808316b20 17-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Revert r135217, which wasn't the correct fix for PR10358. With this
patch, we actually move the state-machine for the value set backwards
one step. This can pretty easily lead to infinite loops where we
continually try to propagate a bit, succeed for one iteration, but then
back up because we find an uninitialized use.

A reduced test case from PR10379 is included.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
05bcade0182524731cf4bc4984e08f63ddf62374 15-Jul-2011 Ted Kremenek <kremenek@apple.com> Fix false negative reported in PR 10358 by using 'Unknown' in -Wuninitialized to avoid cascading warnings. Patch by Kaelyn Uhrain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
e6c28039c63d829577a2e37170e06a1dbdf89748 11-May-2011 Ted Kremenek <kremenek@apple.com> Fix crash in -Wuninitialized when using switch statments whose condition is a logical operation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
584b9d6bd0ce199787900695fe75528fcde405fe 08-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Switch 'is possibly uninitialized' to 'may be uninitialized' based on
Chris's feedback.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
f04eb2de1f17dce4dfaebbf9002844087b7d357d 08-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Now that the analyzer is distinguishing between uninitialized uses that
definitely have a path leading to them, and possibly have a path leading
to them; reflect that distinction in the warning text emitted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
b88fb027bfe2f85da3a341f42549900bd658ac8b 05-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Commit a bit of a hack to fully handle the situation where variables are
marked explicitly as uninitialized through direct self initialization:

int x = x;

With r128894 we prevented warnings about this code, and this patch
teaches the analysis engine to continue analyzing subsequent uses of
'x'. This should wrap up PR9624.

There is still an open question of whether we should suppress the
maybe-uninitialized warnings resulting from variables initialized in
this fashion. The definitely-uninitialized uses should always be warned.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
b414c4fae51c5792d3074b4b78fc8737b1d8387c 05-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Fix PR9624 by explicitly disabling uninitialized warnings for direct self-init:

int x = x;

GCC disables its warnings on this construct as a way of indicating that
the programmer intentionally wants the variable to be uninitialized.
Only the warning on the initializer is turned off in this iteration.

This makes the code a lot more ugly, but starts commenting the
surprising behavior here. This is a WIP, I want to refactor it
substantially for clarity, and to determine whether subsequent warnings
should be suppressed or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
d40066b0fb883839a9100e5455e33190b9b8abac 05-Apr-2011 Ted Kremenek <kremenek@apple.com> Fix PR 9626 (duplicated self-init warnings under -Wuninitialized) with numerous CFG and UninitializedValues analysis changes:

1) Change the CFG to include the DeclStmt for conditional variables, instead of using the condition itself as a faux DeclStmt.
2) Update ExprEngine (the static analyzer) to understand (1), so not to regress.
3) Update UninitializedValues.cpp to initialize all tracked variables to Uninitialized at the start of the function/method.
4) Only use the SelfReferenceChecker (SemaDecl.cpp) on global variables, leaving the dataflow analysis to handle other cases.

The combination of (1) and (3) allows the dataflow-based -Wuninitialized to find self-init problems when the initializer
contained control-flow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
6f41715df2c6a31c0c3ab3088b8cd18a3c8321b8 04-Apr-2011 Ted Kremenek <kremenek@apple.com> -Wuninitialized: use "self-init" warning when issue uninitialized values warnings from the dataflow analysis that include within the initializer of a variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
5360c921a91dc43b442f069ba86d7b9df66362fc 04-Apr-2011 Ted Kremenek <kremenek@apple.com> -Wuninitialized: don't issue fixit for initializer if a variable declaration already has an initializer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
bc8b44c4ee7f9c4c3ad296369e72feda61bdb580 01-Apr-2011 Ted Kremenek <kremenek@apple.com> -Wuninitialized should not warn about variables captured by blocks as byref.

Note this can potentially be enhanced to detect if the __block variable
is actually written by the block, or only when the block "escapes" or
is actually used, but that requires more analysis than it is probably worth
for this simple check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
0a65f946721f1505e5577b1910f3193888696573 17-Mar-2011 Ted Kremenek <kremenek@apple.com> Rename -Wuninitialized-maybe to -Wconditional-uninitialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
908c09f64e50db64c935255089ffcf4615ca4b0e 15-Mar-2011 Ted Kremenek <kremenek@apple.com> Take 2: merge -Wuninitialized-experimental into -Wuninitialized. Only *must-be-uninitialized* warnings are reported, with *maybe-uninitialized* under a separate flag. I await any fallout/comments/feedback, although hopefully this will produce no noise for users.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127670 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
f7bafc77ba12bb1beb665243a0334cd81e024728 15-Mar-2011 Ted Kremenek <kremenek@apple.com> Split warnings from -Wuninitialized-experimental into "must-be-initialized" and "may-be-initialized" warnings, each controlled by different flags.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
f3f5379f6da7f8f141a53e2945871a5aa5431e02 15-Mar-2011 Ted Kremenek <kremenek@apple.com> Remove old UninitializedValues analysis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
1b528445016c2dba23babeea07e352ca8b816262 07-Feb-2011 Ted Kremenek <kremenek@apple.com> Move uninitialized variable checking back under -Wuninitialized-experimental. It is clear from user feedback that this warning is not quite ready.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
553304523bcce281aa3b1afe0f84ae34a90a3c86 03-Feb-2011 Ted Kremenek <kremenek@apple.com> Reenable -Wuninitialized warning for captured block variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
609e3170841dac81c3b7b6b9eccb9c520e42c9b2 03-Feb-2011 Ted Kremenek <kremenek@apple.com> Based on user feedback, swap -Wuninitialized diagnostics to have the warning refer to the bad use, and the note to the variable declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124758 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
9fcbceed43e5610fdff43defe533934733453ae2 01-Feb-2011 Ted Kremenek <kremenek@apple.com> Enhance -Wuninitialized to better reason about || and &&, tracking dual dataflow facts and properly merging them.

Fixes PR 9076.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
96554fd1aa7350498de8911fb6f303a9262e6ec0 27-Jan-2011 Ted Kremenek <kremenek@apple.com> Teach -Wuninitialized about indirect goto. Fixes PR 9071.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
40900ee8f3072d05456134b57c0fad85a6bb21a6 27-Jan-2011 Ted Kremenek <kremenek@apple.com> Teach -Wuninitialized not to assert when analyzing
blocks that reference captured variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
fd6b874f3af26bc64a1d5781833c197b314afb8b 26-Jan-2011 Ted Kremenek <kremenek@apple.com> Merge -Wuninitialized-experimental into -Wuninitialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
dd0f7942c5415ce146dcc02d57fc503c683f8625 26-Jan-2011 Ted Kremenek <kremenek@apple.com> Tweak -Wuninitialized-experimental to not emit
a warning for uses of an uninitialized variable
when the use is a void cast, e.g. (void) x.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
a8c17a5babab35f2db26bf218e7571d1af4afedf 25-Jan-2011 Ted Kremenek <kremenek@apple.com> Teach -Wuninitialized-experimental to also warn
about uninitialized variables captured by blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
9660803cd332d5c605899435019bb3b37fca3acc 23-Jan-2011 Ted Kremenek <kremenek@apple.com> Teach -Wuninitialized-experimental about sizeof().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
dcfb360f6e1aaab0754a98e1e245c2607c46058a 21-Jan-2011 Ted Kremenek <kremenek@apple.com> Provide -Wuninitialized-experimental fixits
for floats, and also check if 'nil' is declared
when suggesting it for initializing ObjC pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
fbb178a0b47fca1b0fb78c5d41198614cf52aa70 21-Jan-2011 Ted Kremenek <kremenek@apple.com> Add basic fixits for -Wuninitialized-experimental
to suggest initializations for pointer and
ObjC pointer types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
94b1b4d785bc0f09f6af4be394e59d51f35dda60 21-Jan-2011 Ted Kremenek <kremenek@apple.com> Enhance -Wuninitialized-experimental diagnostics
to issue the warning at an uninitialized variable's
declaration, but to issue notes at possible
uninitialized uses (which could be multiple).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
13bd4236ab8297350be388ab442b4c42eb8fe437 20-Jan-2011 Ted Kremenek <kremenek@apple.com> Add rudimentary path-sensitivity to UnintializedValuesV2
analysis for short-circuited operations. For branch written like "if (x && y)",
we maintain two sets of dataflow values for the outgoing
branches. This suppresses some common false positives
for -Wuninitialized-experimental.

This change introduces some assertion failures
when running on the LLVM codebase. WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
c21fed361c11f13db345cba69101578578d8fb79 18-Jan-2011 Ted Kremenek <kremenek@apple.com> Teach UninitializedValuesV2 to implicitly reason about C++
references by monitoring whether an access to
a variable is solely to compute it's lvalue or
to do an lvalue-to-rvalue conversion (i.e., a load).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123777 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
4dccb90e92ba9e4abffe0177493b6db9949678dd 18-Jan-2011 Ted Kremenek <kremenek@apple.com> Correctly enable test/Sema/unit-variables.c,
thus identifying a minor logical flaw in
UninitializedValuesV2.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
c104e53639de4424b83955acfadc977773b5883d 18-Jan-2011 Ted Kremenek <kremenek@apple.com> Teach UninitializedValuesV2 about "int x = x" and
also properly handle confluence of loops.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c
610068c8cd2321f90e147b12cf794e1f840b6405 15-Jan-2011 Ted Kremenek <kremenek@apple.com> Add initial prototype for implementation of
-Wuninitialized based on CFG dataflow analysis. WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/uninit-variables.c