History log of /external/clang/lib/Analysis/LiveVariables.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

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

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/Analysis/LiveVariables.cpp
dd9e9cec6f863afa15dd91b34fbf15c66c678c02 09-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196593:
------------------------------------------------------------------------
r196593 | zaks | 2013-12-06 10:56:29 -0800 (Fri, 06 Dec 2013) | 7 lines

Revert "[analyzer] Refactor conditional expression evaluating code"

This reverts commit r189090.

The original patch introduced regressions (see the added live-variables.* tests). The patch depends on the correctness of live variable analyses, which are not computed correctly. I've opened PR18159 to track the proper resolution to this problem.

The patch was a stepping block to r189746. This is why part of the patch reverts temporary destructor tests that started crashing. The temporary destructors feature is disabled by default.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.cpp
6a556a42d48cc098fb8dcb5d4ecdd0e03e32c0ec 23-Aug-2013 Pavel Labath <labath@google.com> [analyzer] Refactor conditional expression evaluating code

Summary:
Instead of digging through the ExplodedGraph, to figure out which edge brought
us here, I compute the value of conditional expression by looking at the
sub-expression values.

To do this, I needed to change the liveness algorithm a bit -- now, the full
conditional expression also depends on all atomic sub-expressions, not only the
outermost ones.

Reviewers: jordan_rose

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1340

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.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/LiveVariables.cpp
55fc873017f10f6f566b182b70f6fc22aefa3464 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.

This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.

I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
a93d0f280693b8418bc88cf7a8c93325f7fcf4c6 01-Dec-2012 Benjamin Kramer <benny.kra@googlemail.com> Include pruning and general cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
c739406d37b9b1dc95bc3a3d899024e5ce31e5d5 14-Aug-2012 Anna Zaks <ganna@apple.com> [analyzer] Teach live variable analyzes that super uses self pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
d7f1d134a03ace51f8d142fbb7f436330704ede5 26-Jul-2012 Jordan Rose <jordan_rose@apple.com> [analyzer] Variables with destructors are live until the destructor is run.

Test case in the next commit, which enables destructors under certain
circumstances.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
d4aeb8050a1d0fe47c53a73361c8b0b8ac310f46 02-Jul-2012 Ted Kremenek <kremenek@apple.com> Bail out the LiveVariables analysis when the CFG is very large, as
we are encountering some scalability issues with memory usage. The
appropriate long term fix is to make the analysis more scalable, but
this will at least prevent the analyzer swapping when
analyzing very large functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
15ce164836472bfba88b30e53aa3f6ac0fb8a95d 22-Dec-2011 Ted Kremenek <kremenek@apple.com> Enhance AnalysisDeclContext::getReferencedBlockVars() to understand PseudoObjExprs. It turns out
that the information collected by this method is a super set of the captured variables in BlockDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
280cf1451b4f02093e47ce956a0688407aa595b9 22-Dec-2011 Ted Kremenek <kremenek@apple.com> Fix regression in LiveVariables when reasoning about variables captured by blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
99ba9e3bd70671f3441fb974895f226a83ce0e66 20-Dec-2011 David Blaikie <dblaikie@gmail.com> Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
f3fb5c5395d382ffd24ec2675237fa9bdff6266e 09-Nov-2011 John McCall <rjmccall@apple.com> We don't add ExprWithCleanups to the CFG, and getSVal looks
through it, so we should look through it for the live-values
analysis as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
4b9c2d235fb9449e249d74f48ecfec601650de93 06-Nov-2011 John McCall <rjmccall@apple.com> Change the AST representation of operations on Objective-C
property references to use a new PseudoObjectExpr
expression which pairs a syntactic form of the expression
with a set of semantic expressions implementing it.
This should significantly reduce the complexity required
elsewhere in the compiler to deal with these kinds of
expressions (e.g. IR generation's special l-value kind,
the static analyzer's Message abstraction), at the lower
cost of specifically dealing with the odd AST structure
of these expressions. It should also greatly simplify
efforts to implement similar language features in the
future, most notably Managed C++'s properties and indexed
properties.

Most of the effort here is in dealing with the various
clients of the AST. I've gone ahead and simplified the
ObjC rewriter's use of properties; other clients, like
IR-gen and the static analyzer, have all the old
complexity *and* all the new complexity, at least
temporarily. Many thanks to Ted for writing and advising
on the necessary changes to the static analyzer.

I've xfailed a small diagnostics regression in the static
analyzer at Ted's request.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
6bbecd5e96c2bfe6dcb935a3ca0deb06782a5b14 05-Nov-2011 Ted Kremenek <kremenek@apple.com> Tweak LookThroughStmt() in LiveVariables to properly look through alternativing ParenExprs and OpaqueValueExprs. Thanks to Anna and Argiris for iterating on this function. My original patch embarssingly didn't even pass the Clang tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
ef911a1bc5ef41c4d43c39294270aeb1dd8d4dac 05-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> LookThroughStmt GM release.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
51e4e1ee2cd46a623df2c7a3f87e48ebcbf7b546 05-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> LookThroughStmt v4.6.3

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
74b5edd7a23e493a968dbe3d6a05974dc62892ad 05-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Simplify LookThroughStmt in LiveVariables.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
38f0b5a611a1776bb5996c56902b64549d093603 05-Nov-2011 Anna Zaks <ganna@apple.com> Another correction to the LiveVariables commit (r143767, r143780).
Make test/Analysis/misc-ps.c test pass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
5112fc48495fa705cabe7ec455f9a6e73ec9ecc7 05-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix infinite loop in LiveVariables due to a misplaced 'break' (it would break out of
switch statement, not the while loop).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
ddaec0dba69f2318d96f949b2f273b2befd1a5c2 05-Nov-2011 Ted Kremenek <kremenek@apple.com> Teach LiveVariables to look through OpaqueValueExprs for extending Stmt liveness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.cpp
edb186399e19d84c93f25440435ab9a695138e79 22-Oct-2011 Ted Kremenek <kremenek@apple.com> Pull TopologicallySortedCFG out of LiveVariables into its own analysis: PostOrderCFGView.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
a5937bbfd19e61d651a58b0f0ffeef68457902a5 08-Oct-2011 Ted Kremenek <kremenek@apple.com> Remove AnalysisContext::getLiveVariables(), and introduce a templatized mechanism to lazily create analyses that are attached to AnalysisContext objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141425 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
c80850353f4051f36be9f5be9738cf877406311a 06-Oct-2011 Ted Kremenek <kremenek@apple.com> [static analyzer] Fix crash in LiveVariables and Environment::getSVal() when analyzing C++ pointer-to-member calls. Fixes <rdar://problem/10243398>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
3c2b5f7d6102bd1878c4ce7fcdd8f67ec9c37064 02-Oct-2011 Ted Kremenek <kremenek@apple.com> Fix another major performance regression in LiveVariables by not canonicalizing the underlying ImmutableSets on every analyzed statement (just at merges). Fixes <rdar://problem/10087538>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
6a835dddf45922e71a87637fdfac0863de65123c 02-Oct-2011 Ted Kremenek <kremenek@apple.com> Fix LiveVariables analysis bug with MaterializeTemporaryExpr and fix handling in ExprEngine. Fixes <rdar://problem/10201666>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
87aa1250a90af9d92ad9d6b7b65610a45bf478c1 17-Sep-2011 Ted Kremenek <kremenek@apple.com> Fix massive LiveVariables regression (due to LiveVariables rewrite) by addressing two performance problems:

- Speed of "merge()", which merged data flow facts. This was doing a set canonicalization on every insertion, which was super slow.
To fix this, we use ImmutableSetRef.

- Visit CFGBlocks in reverse postorder. This is a huge speedup, as on some test cases the algorithm would take many iterations
to converge.

This contains a bunch of copy-paste from UninitializedValues.cpp and ThreadSafety.cpp. The idea
was to get something working first, and then refactor the common logic for all three files into
a separate analysis/library entry point.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.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/LiveVariables.cpp
f91a5b008d1a63630ae483247204c2651e512fa1 06-Aug-2011 Ted Kremenek <kremenek@apple.com> [analyzer] Simplify logic for ExprEngine::VisitUnaryExprOrTypeTraitExpr to avoid recursion to subexpression.

This exposed bugs in the live variables analysis, and a latent analyzer bug in the SymbolReaper.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
39997fc2b8d300a85ead0a7d687964c6e63a8110 02-Aug-2011 Benjamin Kramer <benny.kra@googlemail.com> Make helper functions static.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
882998923889a2fcce9b49696506c499e22cf38f 29-Jul-2011 Ted Kremenek <kremenek@apple.com> [analyzer] Overhaul how the static analyzer expects CFGs by forcing CFGs to be linearized only when used by the static analyzer. This required a rewrite of LiveVariables, and exposed a ton of subtle bugs.

The motivation of this large change is to drastically simplify the logic in ExprEngine going forward.

Some fallout is that the output of some BugReporterVisitors is not as accurate as before; those will
need to be fixed over time. There is also some possible performance regression as RemoveDeadBindings
will be called frequently; this can also be improved over time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.cpp
ac73ea8c12772fd0dcec71b83c193a2837de7f8b 10-Jun-2011 Jordy Rose <jediknil@belkadan.com> [analyzer] PR8962 again. Ban ParenExprs (and friends) from block-level expressions (by calling IgnoreParens before adding expressions to blocks). Undo 132769 (LiveVariables' local IgnoreParens), since it's no longer necessary.

Also, have Environment stop looking through NoOp casts; it didn't match the behavior of LiveVariables. And once that's gone, the whole cast block of that switch is unnecessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132840 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
7fead31dbee1a1349d360eff7b56dc6571449443 09-Jun-2011 Jordy Rose <jediknil@belkadan.com> [analyzer] Ignore parentheses around block-level expressions when computing liveness. Fixes the other half of PR8962.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.cpp
ec49bf464c91a52b3a463940da6589d03bf40248 28-Aug-2010 Tom Care <tom.care@uqconnect.edu.au> Add alternate version of LiveVariables analysis that does not kill liveness at assignments. This 'relaxed' liveness is useful in path sensitive analysis for situations where the resulting extended liveness allows us to find some bugs.
- Added killAtAssign flag to LiveVariables
- Added relaxed LiveVariables to AnalysisContext with an accessor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.cpp
5d55376106f1aeabfab0bcd7e0167db904409a06 04-Jun-2010 Jordy Rose <jediknil@belkadan.com> Assignments to reference variables shouldn't kill the variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
ead78fdfa6113ef10884c184fb40db4b44305dd9 03-Mar-2010 Ted Kremenek <kremenek@apple.com> Fix an algorithmic bug in LiveVariables pointed out by Zhongxing.
If an initializer in a DeclStmt references the declared variable, that
extends the liveness of that variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
15f6b42b68d296cabf117752094693afe813dffb 02-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Register all parameters even if they didn't occur in the function body.
We may query their liveness because they are added to store when passing
argument values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.cpp
84eaeffe94ef63a182a02fcf935d4c651caf2359 30-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Simplify code by using an equivalent template class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
bfbcefb7e99905218b3f0a895b7bc1992203123b 24-Dec-2009 Ted Kremenek <kremenek@apple.com> Enhance dataflow analyses to recognize branch statements in the CFG used as hooks for the initialization of condition variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92119 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.cpp
b1a7b65231e86f7da6aacbf00bcdc16c56350e65 26-Nov-2009 Ted Kremenek <kremenek@apple.com> Enhance LiveVariables to understand that blocks can extend the liveness of a variable by "capturing" them in a BlockExpr.

This required two changes:

1) Added 'getReferencedgetReferencedBlockVars()' to AnalysisContext so
that clients can iterate over the "captured" variables in a block.

2) Modified LiveVariables to take an AnalysisContext& in its
constructor and to call getReferencedgetReferencedBlockVars() when it
processes a BlockExpr*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
3958b502404b4bd67f26fee398cb347abe89e6a8 10-Nov-2009 Jeffrey Yasskin <jyasskin@google.com> Fix clang's use of DenseMap iterators after r86636 fixed their constness.
Patch by Victor Zverovich!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
31d8cadc8337b5f90c2e5eddf712d769e99c977b 07-Nov-2009 Ted Kremenek <kremenek@apple.com> Use SaveAndRestore to simplify logic in LiveVariables::runOnAllBlocks(). Patch by Kovarththanan Rajaratnam!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86343 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
abbbfd960cc0978509e060741ff8cc8db32d6b5c 06-Nov-2009 Chris Lattner <sabre@nondot.org> add some const qualifiers, patch by Kovarththanan Rajaratnam!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
01eb9b9683535d8a65c704ad2c545903409e2d36 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients
are updated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
c0d567279f861844c9e7da492729425a90c03397 17-Oct-2009 Daniel Dunbar <daniel@zuster.org> Use raw_ostream instead of C stdio.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.cpp
e41611aa2237d06a0ef61db4528fb2883a8defcd 16-Jul-2009 Ted Kremenek <kremenek@apple.com> Move the source-level CFG from libAST to libAnalysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
ce2f9bd2bc7dd4e070d46114b6a921127bd1ca86 30-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> Instead of r74522, use another approach to fix xfail_regionstore_wine_crash.c.
Mark the super region of the binding of block level expr in the Environment
as live.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
1b54221f6865b0daae1b8eb8f84bf5d291e8b864 30-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> Block level expr should be visited. Otherwise variables in init expr of
DeclStmt would be dead before the DeclStmt.
For example:
int x = 0;
int y = x;
'x' would be dead before 'int y = x'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
f96f16d9f529ec95c20b9a91405653554e9646d1 07-Apr-2009 Ted Kremenek <kremenek@apple.com> Remove hack from LiveVariables analysis where variables whose address are taken
are considered 'live'. This hack isn't needed anymore because we have a
separation in the path-sensitive analyzer between variable names and bindings;
the analyzer can continue to reason about the storage of a variable after its
name is no longer directly referenced. Now the live variables analysis literally means "is this name live".

Along this line, update the dead stores checker to explicitly look for variables
whose values have escaped.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.cpp
bf98c99600017bfcdde2a7966c47a6beb15a96dc 30-Jan-2009 Ted Kremenek <kremenek@apple.com> Fix horrible non-termination bug in LiveVariables. The issue was that
the liveness state of block-level expressions could oscillate because
of two issues:
- The initial value before a merge was not always set to "Top"
- The set of live block-level expressions is a union, not an intersection

This fixes <rdar://problem/650084>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63421 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
b9c3f966b103f7cfe8e5e60007c4c8b38f7298eb 27-Jan-2009 Chris Lattner <sabre@nondot.org> Introduce a new PresumedLoc class to represent the concept of a location
as reported to the user and as manipulated by #line. This is what __FILE__,
__INCLUDE_LEVEL__, diagnostics and other things should follow (but not
dependency generation!).

This patch also includes several cleanups along the way:

- SourceLocation now has a dump method, and several other places
that did similar things now use it.
- I cleaned up some code in AnalysisConsumer, but it should probably be
simplified further now that NamedDecl is better.
- TextDiagnosticPrinter is now simplified and cleaned up a bit.

This patch is a prerequisite for #line, but does not actually provide
any #line functionality.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
df7c17a8d02fe09a3466786bae3e40fc3252687a 16-Jan-2009 Chris Lattner <sabre@nondot.org> Change some terminology in SourceLocation: instead of referring to
the "physical" location of tokens, refer to the "spelling" location.
This is more concrete and useful, tokens aren't really physical objects!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62309 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
e0dbda136444b2f3550a421f4436d438230c732f 09-Dec-2008 Ted Kremenek <kremenek@apple.com> Fixed LiveVariables bug where we didn't consider block-level expressions that functioned as the size of a VLA to be live.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
06529aeadf03c2a2231a4c7221c422e3650a2a71 14-Nov-2008 Ted Kremenek <kremenek@apple.com> Minor tweaks to liveness analysis:
- Block-expression for 'ObjCForCollectionStmt' is not alive before it occurs
- Recursively visit 'element' expression for ObjCForCollectionStmt to get liveness for referenced block-level expressions and variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
8f646002d8493ad7647d28b0acc7be425360f990 14-Nov-2008 Ted Kremenek <kremenek@apple.com> Handle the case where 'element' in ObjCforCollectionstmt is not a DeclStmt or DeclRefExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.cpp
f8cce1d83e9dc2b175a5f436e8b5bd25e193624b 13-Nov-2008 Ted Kremenek <kremenek@apple.com> Fix uninitialized variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.cpp
8ded8d8e47ba2fcb8f802f789049b6d4ab793a67 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Use Stmt* instead of Expr* for block-level expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
e97d9db35c5a4589718ba76e6caa14cd6919f789 11-Nov-2008 Ted Kremenek <kremenek@apple.com> Accesses to a collection within a fast enumeration 'for' statement constitute a 'use'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.cpp
8f5aab696173cc6e9c9963635d91dc2e83d54442 11-Nov-2008 Ted Kremenek <kremenek@apple.com> Add transfer function support for ObjCForCollectionStmt to LiveVariables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
0165b0c09ef1f25d1818868a632f3565a677953d 21-Oct-2008 Douglas Gregor <dgregor@apple.com> Cosmetic patch from João Paulo Rechi Vita

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
fcd06f77beadf0642bd008fdf596378f8570b55c 26-Sep-2008 Ted Kremenek <kremenek@apple.com> Move VLA processing logic from LiveVariables to CFG construction. This way all dataflow analyses "see" the VLA size expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56655 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
84fa6b90abf73e8cc539c9947ed5a6286f588569 26-Sep-2008 Ted Kremenek <kremenek@apple.com> Examine VLA size expressions when computing liveness information.
Fixes <rdar://problem/6248086>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.cpp
03648657c7327175f0e6349fb7a83115a0562d9d 04-Jul-2008 Ted Kremenek <kremenek@apple.com> Fix a bug in the dead stores checker reported in the following email:

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-July/002157.html

Essentially the observer mechanism in LiveVariables was observing block-level
expressions multiple times, leading to a case where the dead store checker could
see a value as dead when it was really live.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
4111024be81e7c0525e42dadcc126d27e5bf2425 17-Jun-2008 Chris Lattner <sabre@nondot.org> Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl.
Patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.cpp
5cd24389afe21db6f246c20a1f49461fca0b31cb 16-Apr-2008 Ted Kremenek <kremenek@apple.com> LiveVariables now updates the liveness state of block-level expressions that
are referenced by CFGBlock terminators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.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/LiveVariables.cpp
dace4c9d65eb86f96c4c5fbf4ac5920b7197a1b0 15-Apr-2008 Ted Kremenek <kremenek@apple.com> ++/-- makes a variable live since it is used; thus the liveness state is
"Alive" as opposed to staying the same.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49707 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
c8e00b2f4c860af1a01e3db459539ddff78a94a2 15-Apr-2008 Ted Kremenek <kremenek@apple.com> Bug fix in LiveVariables: Operators ++/-- may kill a value, but the variable
is still live.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.cpp
fa59f1f053235e9adf32425f2b6049185771246d 20-Mar-2008 Ted Kremenek <kremenek@apple.com> LiveVariables analysis now uses intersect for the merge of block-level expression liveness information.
The rationale is that a block-level expression cannot be live in a parent block unless it is live in all of the successor blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Analysis/LiveVariables.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/LiveVariables.cpp