[cfe-commits] r143790 - /cfe/trunk/lib/Analysis/LiveVariables.cpp
Ted Kremenek
kremenek at apple.com
Fri Nov 4 23:29:24 PDT 2011
Thanks Anna. I could swear that the tests passed for me. I feel silly that I left out the "continue" statements.
Sent from my iPad
On Nov 4, 2011, at 10:20 PM, Anna Zaks <ganna at apple.com> wrote:
> Author: zaks
> Date: Sat Nov 5 00:20:59 2011
> New Revision: 143790
>
> URL: http://llvm.org/viewvc/llvm-project?rev=143790&view=rev
> Log:
> Another correction to the LiveVariables commit (r143767, r143780).
> Make test/Analysis/misc-ps.c test pass.
>
> Modified:
> cfe/trunk/lib/Analysis/LiveVariables.cpp
>
> Modified: cfe/trunk/lib/Analysis/LiveVariables.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/LiveVariables.cpp?rev=143790&r1=143789&r2=143790&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Analysis/LiveVariables.cpp (original)
> +++ cfe/trunk/lib/Analysis/LiveVariables.cpp Sat Nov 5 00:20:59 2011
> @@ -233,11 +233,15 @@
>
> static const Stmt *LookThroughStmt(const Stmt *S) {
> while (S) {
> - if (const ParenExpr *ParenE = dyn_cast<ParenExpr>(S))
> + if (const ParenExpr *ParenE = dyn_cast<ParenExpr>(S)) {
> S = ParenE->getSubExpr();
> - else if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(S))
> + continue;
> + } else if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(S)) {
> S = OVE->getSourceExpr();
> - else
> + continue;
> + } else if (const Expr *E = dyn_cast<Expr>(S)) {
> + return E->IgnoreParens();
> + } else
> break;
> }
> return S;
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list