History log of /external/clang/lib/Analysis/UninitializedValues.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ef8225444452a1486bd721f3285301fe84643b00 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

This also fixes a small issue with arm_neon.h not being generated always.

Includes a cherry-pick of:
r213450 - fixes mac-specific header issue
r213126 - removes a default -Bsymbolic on Android

Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/lib/Analysis/UninitializedValues.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/Analysis/UninitializedValues.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/Analysis/UninitializedValues.cpp
8a1fdfc69cc6c2ccbfd57fc8ff643c589da9df9b 12-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR16054: Slight strengthening for -Wsometimes-uninitialized: if we use a
variable uninitialized every time we reach its (reachable) declaration, or
every time we call the surrounding function, promote the warning from
-Wmaybe-uninitialized to -Wsometimes-uninitialized.

This is still slightly weaker than desired: we should, in general, warn
if a use is uninitialized the first time it is evaluated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
344472ebeded2fca2ed5013b9e87f81d09bfa908 23-Aug-2013 Robert Wilhelm <robert.wilhelm@gmx.net> Use pop_back_val() instead of both back() and pop_back().
No functionality change intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
d049b40ef411eee12a735233dbe04fdc42c67e1a 16-May-2013 Jordan Rose <jordan_rose@apple.com> Remove unused, awkward CFGStmtVisitor and subclasses.

This class is a StmtVisitor that distinguishes between block-level and
non-block-level statements in a CFG. However, it does so using a hard-coded
idea of which statements might be block-level, which probably isn't accurate
anymore. The only implementer of the CFGStmtVisitor hierarchy was the
analyzer's DeadStoresChecker, and the analyzer creates a linearized CFG
anyway (every non-trivial statement is a block-level statement).

This also allows us to remove the block-expr map ("BlkExprMap"), which
mapped statements to positions in the CFG. Apart from having a helper type
that really should have just been Optional<unsigned>, it was only being
used to ask /if/ a particular expression was block-level, for traversal
purposes in CFGStmtVisitor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
b07805485c603be3d8011f72611465324c9e664b 23-Feb-2013 David Blaikie <dblaikie@gmail.com> Remove the CFGElement "Invalid" state.

Use Optional<CFG*> where invalid states were needed previously. In the one case
where that's not possible (beginAutomaticObjDtorsInsert) just use a dummy
CFGAutomaticObjDtor.

Thanks for the help from Jordan Rose & discussion/feedback from Ted Kremenek
and Doug Gregor.

Post commit code review feedback on r175796 by Ted Kremenek.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175938 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
fdf6a279c9a75c778eba382d9a156697092982a1 21-Feb-2013 David Blaikie <dblaikie@gmail.com> Replace CFGElement llvm::cast support to be well-defined.

See r175462 for another example/more details.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
66874fb18afbffb8b2ca05576851a64534be3352 21-Feb-2013 David Blaikie <dblaikie@gmail.com> Use None rather than Optional<T>() where possible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
dc84cd5efdd3430efb22546b4ac656aa0540b210 20-Feb-2013 David Blaikie <dblaikie@gmail.com> Include llvm::Optional in clang/Basic/LLVM.h

Post-commit CR feedback from Jordan Rose regarding r175594.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
77fd3c0d7837040bb84c1617a6a423f833e784fe 19-Jan-2013 Ted Kremenek <kremenek@apple.com> -Wuninitialized: warn about uninitialized values resulting from ?: that evaluate to lvalues (in C++).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
cfa88f893915ceb8ae4ce2f17c46c24a4d67502f 12-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
67d472c19310c06efd5cb87c60b8489abf507233 11-Jan-2013 Enea Zaffanella <zaffanella@cs.unipr.it> Test commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
2fa67efeaf66a9332c30a026dc1c21bef6c33a6c 01-Dec-2012 Benjamin Kramer <benny.kra@googlemail.com> Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't pull in all the generated Attr code.

Required to pull some functions out of line, but this shouldn't have a perf impact.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
eba76a4379997f66f8114eb7e63206a5932b1be8 17-Nov-2012 Ted Kremenek <kremenek@apple.com> Further reduce "-fsyntax-only -Wuninitialized" time on sqlite3.c by another 2.5% using intelligent pruning of blocks during the final reporting pass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
c1602581f7a4eab486489f09647d724ce35d3f23 17-Nov-2012 Ted Kremenek <kremenek@apple.com> Switch -Wuninitialized to use a reverse-post order traversal as
an initial baseline for enqueued blocks, but use a simple DFS stack
for propagating changes quickly up back edges.

This provides a 3.5% reduction in -fsyntax-only time on sqlite3.c.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
da3d76b4cfbb5ebeb79e03a0abeabd403fe9260a 28-Sep-2012 Benjamin Kramer <benny.kra@googlemail.com> Avoid malloc thrashing in the uninitialized value analysis.

- The size of the packed vector is often small, save mallocs using SmallBitVector.
- Copying SmallBitVectors is also cheap, remove a level of indirection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
25c1d57fc906e895535fb5c7e6dde80219f353b5 13-Sep-2012 Ted Kremenek <kremenek@apple.com> Teach -Wuninitialized to recognize common "noreturn" idioms in
Objective-C related to NSException.

Fixes <rdar://problem/12287498>

I debated whether or not this logic should be sunk into the CFG
itself. It's not clear if we should, as different analyses may
wish to have different policies. We can re-evaluate this in the
future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
44ca53f34deb5efe9fc6f246781f66f1ed83eabc 12-Sep-2012 Ted Kremenek <kremenek@apple.com> Teach -Wuninitialized to recognize __attribute__((analyzer_noreturn))
for halting the propagation of uninitialized value tracking along
a path. Unlike __attribute__((noreturn)), this attribute (which
is used by clients of the static analyzer) can be used to annotate
functions that essentially never return, but in rare cares may be
allowed to return for (special) debugging purposes. This attribute
has been shown in reducing false positives in the static analyzer
by pruning false postives, and is equally applicable here.

Handling this attribute in the CFG itself is another option, but
this is not something all clients (e.g., possibly -Wunreachable-code)
would want to see.

Addresses <rdar://problem/12281583>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
eee18c38b6dd29c0e6982f5565fcbc3f76d1bf4d 19-Jul-2012 Ted Kremenek <kremenek@apple.com> Simplify UninitializedValues.cpp by removing logic to handle the previous (imprecise) representation
of '&&' and '||' in the CFG. This is no longer needed, and greatly simplifies the code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
6cfa78f6bd4e7d5e23366a0907f8f8792366bc4c 17-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> Uninitialized variables: two little changes:
* Treat compound assignment as a use, at Jordy's request.
* Always add compound assignments into the CFG, so we can correctly diagnose the use in 'return x += 1;'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
9532e0d89ca2afa556f032aa9377f6ec1d3eaa3e 17-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> -Wuninitialized: Split the classification of DeclRefExprs as initialization or
use out of TransferFunctions, and compute it in advance rather than on-the-fly.

This allows us to handle compound assignments with DeclRefExprs on the RHS
correctly, and also makes it trivial to treat const& function parameters as not
initializing the argument. The patch also makes both of those changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
558e8872b364b43ab9f201dd6b2df9a5b74b0542 14-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR13360: When deciding the earliest point which inevitably leads to an
uninitialized variable use, walk back over branches where we've reached all the
non-null successors, not just cases where we've reached all successors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
a9e8b9e3e90fcfe10a04624a89c39b63c32614d1 03-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> -Wuninitialized: assume that an __attribute__((returns_twice)) function might
initialize any variable. This is extremely conservative, but is sufficient for
now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
8f40dcc4ddbe4ef796dd1bf0696ac66d4e40e99a 17-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> -Wuninitialized bugfix: when entering the scope of a variable with no
initializer, it is uninitialized, even if we may be coming from somewhere where
it was initialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
581deb3da481053c4993c7600f97acf7768caac5 06-Jun-2012 David Blaikie <dblaikie@gmail.com> Revert Decl's iterators back to pointer value_type rather than reference value_type

In addition, I've made the pointer and reference typedef 'void' rather than T*
just so they can't get misused. I would've omitted them entirely but
std::distance likes them to be there even if it doesn't use them.

This rolls back r155808 and r155869.

Review by Doug Gregor incorporating feedback from Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
2815e1a075c74143a0b60a632090ece1dffa5c7c 25-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> Split a chunk of -Wconditional-uninitialized warnings out into a separate flag,
-Wsometimes-uninitialized. This detects cases where an explicitly-written branch
inevitably leads to an uninitialized variable use (so either the branch is dead
code or there is an uninitialized use bug).

This chunk of warnings tentatively lives within -Wuninitialized, in order to
give it more visibility to existing Clang users.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
818918855d84e3db1af5a0807070d4995ca2cf75 25-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> Some cleanups around the uninitialized variables warning, and a FIXME. No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
262bc18e32500558af7cb0afa205b34bd37bafed 30-Apr-2012 David Blaikie <dblaikie@gmail.com> Remove the ref/value inconsistency in filter_decl_iterator.

filter_decl_iterator had a weird mismatch where both op* and op-> returned T*
making it difficult to generalize this filtering behavior into a reusable
library of any kind.

This change errs on the side of value, making op-> return T* and op* return
T&.

(reviewed by Richard Smith)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
b86b8551ce619450b2eb4fc708ead08b83996da7 30-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR11926 + duplicates: Fix crash in -Wuninitialized when using a compiler like
g++4.7, which reuses stack space allocated for temporaries. CFGElement::getAs
returns a suitably-cast version of 'this'. Patch by Markus Trippelsdorf!

No test: this code has the same observable behavior as the old code when built
with most compilers, and the tests were already failing when built with a
compiler for which this produced a broken binary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155803 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
b2c60b04a597cc5ba4154837cf8e0a155a376fd7 01-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move llvm/ADT/SaveAndRestore.h -> llvm/Support/SaveAndRestore.h.

Needs llvm update.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
d45d361f2ce5c37824052357e2218e8a5509eba5 27-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move "clang/Analysis/Support/SaveAndRestore.h" to "llvm/ADT/SaveAndRestore.h"
to make it more widely available.

Depends on llvm commit r151564

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151566 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
1d26f48dc2eea1c07431ca1519d7034a21b9bcff 24-Oct-2011 Ted Kremenek <kremenek@apple.com> Rename AnalysisContext to AnalysisDeclContext. Not only is this name more accurate, but it frees up the name AnalysisContext for other uses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
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/lib/Analysis/UninitializedValues.cpp
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/lib/Analysis/UninitializedValues.cpp
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/lib/Analysis/UninitializedValues.cpp
f1d10d939739f1a4544926d807e4f0f9fb64be61 24-Aug-2011 Ted Kremenek <kremenek@apple.com> Constify the result of CFGStmt::getStmt().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
e0e29332c89da22b6890929b97e6f568c917d85f 20-Aug-2011 Ted Kremenek <kremenek@apple.com> Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
3060178ad9df29789505c1e6debcfc80a3a13587 18-Aug-2011 Chad Rosier <mcrosier@apple.com> Fix else style. No functionality change intended.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
9c378f705405d37f49795d5e915989de774fe11f 13-Aug-2011 Ted Kremenek <kremenek@apple.com> Cleanup various declarations of 'Stmt*' to be 'Stmt *', etc. in libAnalyzer and libStaticAnalyzer[*]. It was highly inconsistent, and very ugly to look at.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
de091aeb4658e986ed8fa5fbce7ab35ef2ae26ec 08-Aug-2011 Ted Kremenek <kremenek@apple.com> Fix another -Wuninitialized assertion failure (this one involving bit casts) resulting from the recent -Wuninitialized changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
57fb591a54eab7db65d73e77c632f047bca22c54 05-Aug-2011 Ted Kremenek <kremenek@apple.com> Fix assertion failure in -Wuninitialized involving no-op casts. Fixes PR 10577.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
5f9e272e632e951b1efe824cd16acb4d96077930 23-Jul-2011 Chris Lattner <sabre@nondot.org> remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
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/lib/Analysis/UninitializedValues.cpp
dd4286b5b7b02b8bb962e4b996b8f36cb7935d4f 20-Jul-2011 Ted Kremenek <kremenek@apple.com> Fix -Wuninitialized regression involving functions invalidating parameters passed by reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
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/lib/Analysis/UninitializedValues.cpp
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/lib/Analysis/UninitializedValues.cpp
0c8e5a0f70cbdb800d939c1807d05f380b2854d4 19-Jul-2011 Ted Kremenek <kremenek@apple.com> Reduce -Wuninitialized time by 22% (on sqlite) by removing the recursive AST crawl.

This is accomplished by forcing the needed expressions for -Wuninitialized to always be CFGElements in the CFG.
This allows us to remove a fair amount of the code for -Wuninitialized.

Some fallout:
- AnalysisBasedWarnings.cpp now specifically toggles the CFGBuilder to create a CFG that is suitable for -Wuninitialized. This
is a layering violation, since the logic for -Wuninitialized is in libAnalysis. This can be fixed with the proper refactoring.
- Some of the source locations for -Wunreachable-code warnings have shifted. While not ideal, this is okay because that analysis
already needs some serious reworking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
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/lib/Analysis/UninitializedValues.cpp
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/lib/Analysis/UninitializedValues.cpp
8052050c8ebfcfbbce8afed57fefc8c95fb9a333 08-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Make the worklist in the uninitialized values checker actually a queue.
Previously, despite the names 'enqueue' and 'dequeue', it behaved as
a stack and visited blocks in a LIFO fashion. This interacts badly with
extremely broad CFGs *inside* of a loop (such as a large switch inside
a state machine) where every block updates a different variable.

When encountering such a CFG, the checker visited blocks in essentially
a "depth first" order due to the stack-like behavior of the work list.
Combined with each block updating a different variable, the saturation
logic of the checker caused it to re-traverse blocks [1,N-1] of the
broad CFG inside the loop after traversing block N. These re-traversals
were to propagate the variable values derived from block N. Assuming
approximately the same number of variables as inner blocks exist, the
end result is O(N^2) updates. By making this a queue, we also make the
traversal essentially "breadth-first" across each of the N inner blocks
of the loop. Then all of this state is propagated around to all N inner
blocks of the loop. The result is O(N) updates.

The truth is in the numbers:
Before, gcc.c: 96409 block visits (max: 61546, avg: 591)
After, gcc.c: 69958 block visits (max: 33090, avg: 429)
Before, PR10183: 2540494 block vists (max: 2536495, avg: 37360)
After, PR10183: 137803 block visits (max: 134406, avg: 2026)

The nearly 20x reduction in work for PR10183 corresponds to a roughly
100x speedup in compile time.

I've tested it on all the code I can get my hands on, and I've seen no
slowdowns due to this change. Where I've collected stats, the ammount of
work done is on average less. I'll also commit shortly some synthetic
test cases useful in analyzing the performance of CFG-based warnings.

Submitting this based on Doug's feedback that post-commit review should
be good. Ted, please review! Hopefully this helps compile times until
then.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
5d98994c7749312a43ce6adf45537979a98e7afd 06-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Build up statistics about the work done for analysis based warnings.
Special detail is added for uninitialized variable analysis as this has
serious performance problems than need to be tracked.

Computing some of this data is expensive, for example walking the CFG to
determine its size. To avoid doing that unless the stats data is going
to be used, we thread a bit into the Sema object to track whether
detailed stats should be collected or not. This bit is used to avoid
computations whereever the computations are likely to be more expensive
than checking the state of the flag. Thus, counters are in some cases
unconditionally updated, but the more expensive (and less frequent)
aggregation steps are skipped.

With this patch, we're able to see that for 'gcc.c':
*** Analysis Based Warnings Stats:
232 functions analyzed (0 w/o CFGs).
7151 CFG blocks built.
30 average CFG blocks per function.
1167 max CFG blocks per function.
163 functions analyzed for uninitialiazed variables
640 variables analyzed.
3 average variables per function.
94 max variables per function.
96409 block visits.
591 average block visits per function.
61546 max block visits per function.

And for the reduced testcase in PR10183:
*** Analysis Based Warnings Stats:
98 functions analyzed (0 w/o CFGs).
8526 CFG blocks built.
87 average CFG blocks per function.
7277 max CFG blocks per function.
68 functions analyzed for uninitialiazed variables
1359 variables analyzed.
19 average variables per function.
1196 max variables per function.
2540494 block visits.
37360 average block visits per function.
2536495 max block visits per function.

That last number is the somewhat scary one that indicates the problem in
PR10183.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
049f6d0239e242dc338be6ac6f6c5175803d2163 31-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Utilize PackedVector, introduced with llvm commit r132325.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
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/lib/Analysis/UninitializedValues.cpp
75c4064932d481ac710a80aa88b3370ad8a6af1d 28-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Silence more -Wnon-pod-memset given its current implementation. I may be
able to revert these based on a patch I'm working on, but no reason for
people to be spammed with warnings in the interim.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
efdf988611c1eb02770643cd3fabd5df2f579353 15-Apr-2011 Douglas Gregor <dgregor@apple.com> When we transform a C++ exception declaration (e.g., for template
instantiation), be sure to add the transformed declaration into the
current DeclContext. Also, remove the -Wuninitialized hack that works
around this bug. Fixes <rdar://problem/9200676>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
866849498461cf9022316034516475188b25955b 13-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Teach -Wuninitialized about C++'s typeid expression, including both the
evaluated and unevaluated contexts. Add some testing of sizeof and
typeid.

Both of the typeid tests added here were triggering warnings previously.
Now the one false positive is suppressed without suppressing the warning
on actually buggy code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
a21612f95792c1ea8b4362f0861f0c724c39388e 07-Apr-2011 Ted Kremenek <kremenek@apple.com> Teach -Wuninitialized to not warn about variables declared in C++ catch statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
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/lib/Analysis/UninitializedValues.cpp
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/lib/Analysis/UninitializedValues.cpp
f8adeefa9e9882bff402e092024dd457f8574673 04-Apr-2011 Ted Kremenek <kremenek@apple.com> -Wuninitialized: don't warn about uninitialized variables in unreachable code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128840 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
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/lib/Analysis/UninitializedValues.cpp
b831c673621c5587642343cace9def134916a17b 29-Mar-2011 Ted Kremenek <kremenek@apple.com> Add workaround for Sema issue found in <rdar://problem/9188004>, which leads to an assertion failure in the uninitialized variables analysis. The problem is that Sema isn't properly registering a variable in a DeclContext (which -Wuninitialized relies on), but
my expertise on the template instantiation logic isn't good enough to fix this problem for real. This patch worksaround the
problem in -Wuninitialized, but we should fix it for real later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
da57f3eeab7b7f7f6e6788956f0a0d9adf196a7d 26-Mar-2011 Benjamin Kramer <benny.kra@googlemail.com> Make helpers static.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
1cbc31515e9b979f55178ffd4587e8671f7ebbfa 17-Mar-2011 Ted Kremenek <kremenek@apple.com> Extend -Wuninitialized to support vector types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
4ddb3871307376d27d0f276c9da0ecce0384f01f 15-Mar-2011 Ted Kremenek <kremenek@apple.com> Appease GCC. I'm surprised Clang accepted this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
76709bf816e5e1b70b859bb607cf3ee91db12b76 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@127669 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
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/lib/Analysis/UninitializedValues.cpp
496398d523de712ac1084c53a397ca3987fe43db 15-Mar-2011 Ted Kremenek <kremenek@apple.com> UninitializedValues: introduce ValueVector:reference class to forward to llvm::BitVector. No real functionality change, but this is a stepping stone to moving to tri-state logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
afb10c4bda2ac2c268fa7e6c11141584f57de119 15-Mar-2011 Ted Kremenek <kremenek@apple.com> UninitializedValues: wrap BitVector references in a new class ValueVector. No functionality change. This defines the minimum interface that ValueVector needs to support when we no longer base it strictly on a direct interpretation of BitVector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
136f8f24b0b6c0e57aaa4375d280d72dc5492615 15-Mar-2011 Ted Kremenek <kremenek@apple.com> Substitue term "BitVector" with "ValueVector" to prep for further revisions. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
6f34213f8d6ae8c77685b53664527e39bfaaca3b 15-Mar-2011 Ted Kremenek <kremenek@apple.com> Rename UninitializedValuesV2 to UninitializedValues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
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/lib/Analysis/UninitializedValues.cpp
56ca35d396d8692c384c785f9aeebcf22563fe1e 17-Feb-2011 John McCall <rjmccall@apple.com> Change the representation of GNU ?: expressions to use a different expression
class and to bind the shared value using OpaqueValueExpr. This fixes an
unnoticed problem with deserialization of these expressions where the
deserialized form would lose the vital pointer-equality trait; or rather,
it fixes it because this patch also does the right thing for deserializing
OVEs.

Change OVEs to not be a "temporary object" in the sense that copy elision is
permitted.

This new representation is not totally unawkward to work with, but I think
that's really part and parcel with the semantics we're modelling here. In
particular, it's much easier to fix things like the copy elision bug and to
make the CFG look right.

I've tried to update the analyzer to deal with this in at least some
obvious cases, and I think we get a much better CFG out, but the printing
of OpaqueValueExprs probably needs some work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
7502c1d3ce8bb97bcc4f7bebef507040bd93b26f 13-Feb-2011 John McCall <rjmccall@apple.com> Give some convenient idiomatic accessors to Stmt::child_range and
Stmt::const_child_range, then make a bunch of places use them instead
of the individual iterator accessors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
848ec83483ca4ba52ed72c7e29ebc330f8c87252 12-Feb-2011 Ted Kremenek <kremenek@apple.com> Don't report dead stores on unreachable code paths. Fixes <rdar://problem/8405222>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
b6bbcc9995186799a60ce17d0c1acff31601653a 15-Oct-2010 John McCall <rjmccall@apple.com> Death to blocks, or at least the word "block" in one particular obnoxiously
ambiguous context.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
2de56d1d0c3a504ad1529de2677628bdfbb95cd4 25-Aug-2010 John McCall <rjmccall@apple.com> GCC didn't care for my attempt at API compatibility, so brute-force everything
to the new constants.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112047 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
5ba290a12fb9390a77ea4dca3d98deb53022d182 02-Mar-2010 Ted Kremenek <kremenek@apple.com> [CFG]

After discussion with Zhongxing, don't force the initializer of DeclStmts to be
block-level expressions.

This led to some interesting fallout:

[UninitializedValues]

Always visit the initializer of DeclStmts (do not assume they are block-level expressions).

[BasicStore]

With initializers of DeclStmts no longer block-level expressions, this causes self-referencing initializers (e.g. 'int x = x') to no longer cause the initialized variable to be live before the DeclStmt. While this is correct, it caused BasicStore::RemoveDeadBindings() to prune off the values of these variables from the initial store (where they are set to uninitialized). The fix is to back-port some (and only some) of the lazy-binding logic from RegionStore to
BasicStore. Now the default values of local variables are determined lazily as opposed
to explicitly initialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
1309f9a3b225ea846e5822691c39a77423125505 25-Jan-2010 Ted Kremenek <kremenek@apple.com> Split libAnalysis into two libraries: libAnalysis and libChecker.

(1) libAnalysis is a generic analysis library that can be used by
Sema. It defines the CFG, basic dataflow analysis primitives, and
inexpensive flow-sensitive analyses (e.g. LiveVariables).

(2) libChecker contains the guts of the static analyzer, incuding the
path-sensitive analysis engine and domain-specific checks.

Now any clients that want to use the frontend to build their own tools
don't need to link in the entire static analyzer.

This change exposes various obvious cleanups that can be made to the
layout of files and headers in libChecker. More changes pending. :)

This change also exposed a layering violation between AnalysisContext
and MemRegion. BlockInvocationContext shouldn't explicitly know about
BlockDataRegions. For now I've removed the BlockDataRegion* from
BlockInvocationContext (removing context-sensitivity; although this
wasn't used yet). We need to have a better way to extend
BlockInvocationContext (and any LocationContext) to add
context-sensitivty.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
ba5fb5a955c896815c439289fc51c03cf0635129 28-Nov-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> lib/Analysis: Remove VISIBILITY_HIDDEN from definitions in anonymous namespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
1eb4433ac451dc16f4133a88af2d002ac26c58ef 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
7e24e82a70a2c681f4291a3397bcd1e1005f251a 28-Mar-2009 Chris Lattner <sabre@nondot.org> rename some methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
500d3297d2a21edeac4d46cbcbe21bc2352c2a28 29-Jan-2009 Chris Lattner <sabre@nondot.org> move library-specific diagnostic headers into library private dirs. Reduce
redundant #includes. Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
20c6b3b85e186cd52d5d99489132d71d498159eb 27-Jan-2009 Chris Lattner <sabre@nondot.org> Split the single monolithic DiagnosticKinds.def file into one
.def file for each library. This means that adding a diagnostic
to sema doesn't require all the other libraries to be rebuilt.

Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
c2813f77bad184470f81f85f7df88b87eb1bb915 14-Nov-2008 Ted Kremenek <kremenek@apple.com> Flow-sensitive uninitialized values analysis: properly handle the 'element' expression of ObjCForCollectionStmt (can be anything).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
8d798c75b8aa8457ea06b22c6637d626ce1402de 14-Nov-2008 Ted Kremenek <kremenek@apple.com> Rename header file.
Update include files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
bfcb712627b9346ab92880d9075896dcc7700ac2 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Update CFGStmtVisitor to recognize that ObjCForCollectionStmts are special block-level "expressions".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
e219b8a9c02198b1938dfa9ed91ef9cf0e6ce4f3 11-Nov-2008 Ted Kremenek <kremenek@apple.com> Flow-sensitive uninitialized values analysis:
- Added support for ObjCForCollectionStmt
- Fixed bug where expression values would be always set to uninitialized when loops were involved


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
0518999d3adcc289997bd974dce90cc97f5c1c44 11-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof expressions, both of values and types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
5d796aa7899d37d7f243fbc738d6bb8108791fbe 16-Aug-2008 Nick Lewycky <nicholas@mxc.ca> It's spelt "uninitialized".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
14f8b4ff660bcaa763974b8d0fae81857c594495 05-Aug-2008 Ted Kremenek <kremenek@apple.com> Added decl_iterator to DeclStmt to provide an abstract interface to iterate over the ScopedDecls of a DeclStmt.
Updated a few clients of DeclStmt::getNextDeclarator() to use decl_iterator instead. Will update other clients after additional testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
5da6b2592fbf69708a7863b41d8bd76440d0f41b 17-Apr-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix MSVC compiler error: "initialization of 'VD' is skipped by 'case' label"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
411cdee0b490f79428c9eb977f25199eb7d21cd8 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Added CFGBlock::getTerminatorCondition() to get the Expr* of the condition a block's terminator.
Refactored LiveVariables to use getTerminatorCondition() in VisitTerminator().

Bug fix: CFG now computes Block-level expression numbers using information
from block terminators. This fixes <rdar://problem/5868189>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
2f868c013935791c421def45b422a6f6e79d2e4a 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Simplify some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
606ceeef820a3ecd46255d155e5d7f3aa888a04b 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Change "VisitBlockVarDecl" to "VisitVarDecl". UninitializedValues now works
as before r49748 (where BlockVarDecl was removed).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49749 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
248a753f6b670692523c99afaeb8fe98f7ae3ca7 16-Apr-2008 Steve Naroff <snaroff@apple.com> Remove FileVarDecl and BlockVarDecl. They are replaced by VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl().

This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
7deed0c65b315cac037539401c49586283158d9f 15-Apr-2008 Ted Kremenek <kremenek@apple.com> Fix bug in terminator processing for uninitialized-values: simply ignore the terminator, don't reprocess it.

LiveVariables analysis now does a flow-insensitive analysis to determine what variables have their address taken; these variables are now always treated as being live.

The DataflowSolver now uses "SetTopValue()" when getting the initial value for the entry/exit block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
37622081d8a139a3249613acaa80106ec97261fb 15-Apr-2008 Ted Kremenek <kremenek@apple.com> Added initial support into the flow-sensitive dataflow solver to visit the Block-level expression
in a block's terminator. This expression is visited within a block, but it is accessed by the
terminator. This is important to observe because for live-variables analysis the block-level
expression is live between the terminator and where the expression occurs in the block. So far
this hasn't been an issue to not observe this because the block-level expression used in the
terminator is always the last one in the block, and we have never queried the liveness information
about this point (but before the terminator).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
5fb5c6afbb331b87c638fad42f5b37ed697e5580 22-Mar-2008 Ted Kremenek <kremenek@apple.com> Changed merge operation for uninitialized values analysis to "intersect" (previous union).

The effect is that if a variable is uninitialized along a branch (but initialized along another), at merge points it is considered uninitialized. Previously we had the opposite behavior. The new behavior is more conservative, and more in line with gcc's behavior.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp
bda0b626e74513950405c27525af87e214e605e2 16-Mar-2008 Chris Lattner <sabre@nondot.org> Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it. This follows the main
llvm tree, and allows the libraries to be built in parallel. The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in. This speeds
up parallel builds, particularly incremental ones.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/UninitializedValues.cpp