aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/CXXInheritance.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2013-01-15 22:09:40 +0000
committerDavid Greene <greened@obbligato.org>2013-01-15 22:09:40 +0000
commit3f7b3a754e9698d613672dd1f7af3ccd1b42470a (patch)
tree2f0763f20216019ecc33a65ff9cdf080d92167a6 /lib/AST/CXXInheritance.cpp
parentc23e69d761e369bb7ffeef52926ab0442c41670f (diff)
Fix Cast
Avoid a cast-away-const error by properly using const_cast<>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172558 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/CXXInheritance.cpp')
-rw-r--r--lib/AST/CXXInheritance.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AST/CXXInheritance.cpp b/lib/AST/CXXInheritance.cpp
index 5083a010e1..0e0b35d92a 100644
--- a/lib/AST/CXXInheritance.cpp
+++ b/lib/AST/CXXInheritance.cpp
@@ -118,7 +118,8 @@ static bool BaseIsNot(const CXXRecordDecl *Base, void *OpaqueTarget) {
}
bool CXXRecordDecl::isProvablyNotDerivedFrom(const CXXRecordDecl *Base) const {
- return forallBases(BaseIsNot, (void*) Base->getCanonicalDecl());
+ return forallBases(BaseIsNot,
+ const_cast<CXXRecordDecl *>(Base->getCanonicalDecl()));
}
bool