Avoid a cast-away-const error by properly using const_cast<>.
---
 llvm/tools/clang/lib/AST/CXXInheritance.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/llvm/tools/clang/lib/AST/CXXInheritance.cpp b/llvm/tools/clang/lib/AST/CXXInheritance.cpp
index 5083a01..0e0b35d 100644
--- a/llvm/tools/clang/lib/AST/CXXInheritance.cpp
+++ b/llvm/tools/clang/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
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to