[cfe-commits] r114056 - in /cfe/trunk: include/clang/Analysis/CFG.h include/clang/Analysis/FlowSensitive/DataflowSolver.h include/clang/Analysis/ProgramPoint.h include/clang/Checker/PathSensitive/GRCoreEngine.h lib/Analysis/CFG.cpp lib/Analysis/C
Zhongxing Xu
xuzhongxing at gmail.com
Thu Sep 16 01:16:56 PDT 2010
On Thu, Sep 16, 2010 at 11:28 AM, John McCall <rjmccall at apple.com> wrote:
> On Sep 15, 2010, at 6:25 PM, Zhongxing Xu wrote:
> > Modified: cfe/trunk/include/clang/Analysis/FlowSensitive/DataflowSolver.h
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/FlowSensitive/DataflowSolver.h?rev=114056&r1=114055&r2=114056&view=diff
> >
> ==============================================================================
> > --- cfe/trunk/include/clang/Analysis/FlowSensitive/DataflowSolver.h
> (original)
> > +++ cfe/trunk/include/clang/Analysis/FlowSensitive/DataflowSolver.h Wed
> Sep 15 20:25:47 2010
> > @@ -273,8 +273,11 @@
> > void ProcessBlock(const CFGBlock* B, bool recordStmtValues,
> > dataflow::forward_analysis_tag) {
> >
> > - for (StmtItr I=ItrTraits::StmtBegin(B), E=ItrTraits::StmtEnd(B);
> I!=E;++I)
> > - ProcessStmt(*I, recordStmtValues, AnalysisDirTag());
> > + for (StmtItr I=ItrTraits::StmtBegin(B), E=ItrTraits::StmtEnd(B);
> I!=E;++I) {
> > + CFGElement E = *I;
> > + if (CFGStmt S = E.getAs<CFGStmt>())
> > + ProcessStmt(S, recordStmtValues, AnalysisDirTag());
> > + }
> >
> > TF.VisitTerminator(const_cast<CFGBlock*>(B));
> > }
> > @@ -284,8 +287,11 @@
> >
> > TF.VisitTerminator(const_cast<CFGBlock*>(B));
> >
> > - for (StmtItr I=ItrTraits::StmtBegin(B), E=ItrTraits::StmtEnd(B);
> I!=E;++I)
> > - ProcessStmt(*I, recordStmtValues, AnalysisDirTag());
> > + for (StmtItr I=ItrTraits::StmtBegin(B), E=ItrTraits::StmtEnd(B);
> I!=E;++I) {
> > + CFGElement E = *I;
> > + if (CFGStmt S = E.getAs<CFGStmt>())
> > + ProcessStmt(S, recordStmtValues, AnalysisDirTag());
> > + }
> > }
>
> C++ forbids this sort of immediate redeclaration of names that were
> introduced in a 'for' scope ("E" in both cases); basically, it's all
> treated as the same scope according to the standard. This was causing build
> failures, which I fixed for you in r114059, but please watch out for this in
> the future.
>
> John.
Yes. This was my bug. Thanks for reminding.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100916/267456d7/attachment.html>
More information about the cfe-commits
mailing list