From: Marcin Swiderski Date: Tue, 16 Nov 2010 08:50:38 +0000 (+0000) Subject: Refactored GRExprEngine::getCXXThisRegion to use CXXMethodDecl::getThisType instead... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=051beb55e003086a8c974d2b9db3b4cbe8ea083c;p=clang Refactored GRExprEngine::getCXXThisRegion to use CXXMethodDecl::getThisType instead of calculating it by hand. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119341 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Checker/GRCXXExprEngine.cpp b/lib/Checker/GRCXXExprEngine.cpp index 072c21e721..4984305f00 100644 --- a/lib/Checker/GRCXXExprEngine.cpp +++ b/lib/Checker/GRCXXExprEngine.cpp @@ -66,8 +66,7 @@ void GRExprEngine::EvalArguments(ConstExprIterator AI, ConstExprIterator AE, const CXXThisRegion *GRExprEngine::getCXXThisRegion(const CXXRecordDecl *D, const StackFrameContext *SFC) { - Type *T = D->getTypeForDecl(); - QualType PT = getContext().getPointerType(QualType(T, 0)); + QualType PT = D->getThisType(getContext()); return ValMgr.getRegionManager().getCXXThisRegion(PT, SFC); }