From 0cf3c0eecbff007cea2750c113894b47d9e09f33 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Thu, 3 May 2012 16:25:49 +0000 Subject: [PATCH] Correctly constify clang::CXXMemberCallExpr::getRecordDecl() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156074 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/ExprCXX.h | 2 +- lib/AST/ExprCXX.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/clang/AST/ExprCXX.h b/include/clang/AST/ExprCXX.h index 8d7b8c6791..221e4de790 100644 --- a/include/clang/AST/ExprCXX.h +++ b/include/clang/AST/ExprCXX.h @@ -118,7 +118,7 @@ public: /// declaration as that of the class context of the CXXMethodDecl which this /// function is calling. /// FIXME: Returns 0 for member pointer call exprs. - CXXRecordDecl *getRecordDecl(); + CXXRecordDecl *getRecordDecl() const; static bool classof(const Stmt *T) { return T->getStmtClass() == CXXMemberCallExprClass; diff --git a/lib/AST/ExprCXX.cpp b/lib/AST/ExprCXX.cpp index 791ad29617..e4545c152f 100644 --- a/lib/AST/ExprCXX.cpp +++ b/lib/AST/ExprCXX.cpp @@ -458,7 +458,7 @@ CXXMethodDecl *CXXMemberCallExpr::getMethodDecl() const { } -CXXRecordDecl *CXXMemberCallExpr::getRecordDecl() { +CXXRecordDecl *CXXMemberCallExpr::getRecordDecl() const { Expr* ThisArg = getImplicitObjectArgument(); if (!ThisArg) return 0; -- 2.40.0