From 0cf3c0eecbff007cea2750c113894b47d9e09f33 Mon Sep 17 00:00:00 2001
From: David Blaikie <dblaikie@gmail.com>
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 8d7b8c6791b..221e4de790e 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 791ad296171..e4545c152f1 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;
-- 
GitLab