[cfe-commits] r115609 - /cfe/trunk/lib/Analysis/CFG.cpp
Marcin Ĺwiderski
marcin.sfider at gmail.com
Tue Oct 5 02:47:49 PDT 2010
I don't know how I did overlook this... Thanks for fixing.
2010/10/5 Zhongxing Xu <xuzhongxing at gmail.com>
> Author: zhongxingxu
> Date: Tue Oct 5 03:38:06 2010
> New Revision: 115609
>
> URL: http://llvm.org/viewvc/llvm-project?rev=115609&view=rev
> Log:
> * Simplify code
> * Fix dump() to make it consistent with the test case.
>
> Modified:
> cfe/trunk/lib/Analysis/CFG.cpp
>
> Modified: cfe/trunk/lib/Analysis/CFG.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFG.cpp?rev=115609&r1=115608&r2=115609&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Analysis/CFG.cpp (original)
> +++ cfe/trunk/lib/Analysis/CFG.cpp Tue Oct 5 03:38:06 2010
> @@ -642,14 +642,14 @@
> }
>
> // Check if type is a C++ class with non-trivial destructor.
> - if (const RecordType* RT = QT.getTypePtr()->getAs<RecordType>())
> - if (const CXXRecordDecl* CD = dyn_cast<CXXRecordDecl>(RT->getDecl()))
> - if (!CD->hasTrivialDestructor()) {
> - // Add the variable to scope
> - Scope = createOrReuseLocalScope(Scope);
> - Scope->addVar(VD);
> - ScopePos = Scope->begin();
> - }
> +
> + if (const CXXRecordDecl* CD = QT->getAsCXXRecordDecl())
> + if (!CD->hasTrivialDestructor()) {
> + // Add the variable to scope
> + Scope = createOrReuseLocalScope(Scope);
> + Scope->addVar(VD);
> + ScopePos = Scope->begin();
> + }
> return Scope;
> }
>
> @@ -2715,13 +2715,13 @@
> } else if (CFGBaseDtor BE = E.getAs<CFGBaseDtor>()) {
> const CXXBaseSpecifier *BS = BE.getBaseSpecifier();
> OS << "~" << BS->getType()->getAsCXXRecordDecl()->getName() << "()";
> - OS << " (Base destructor)\n";
> + OS << " (Base object destructor)\n";
>
> } else if (CFGMemberDtor ME = E.getAs<CFGMemberDtor>()) {
> FieldDecl *FD = ME.getFieldDecl();
> OS << "this->" << FD->getName();
> OS << ".~" << FD->getType()->getAsCXXRecordDecl()->getName() << "()";
> - OS << " (Member destructor)\n";
> + OS << " (Member object destructor)\n";
> }
> }
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101005/2a489c67/attachment.html>
More information about the cfe-commits
mailing list