[cfe-commits] r172558 - /cfe/trunk/lib/AST/CXXInheritance.cpp
David Greene
greened at obbligato.org
Tue Jan 15 14:09:40 PST 2013
Author: greened
Date: Tue Jan 15 16:09:40 2013
New Revision: 172558
URL: http://llvm.org/viewvc/llvm-project?rev=172558&view=rev
Log:
Fix Cast
Avoid a cast-away-const error by properly using const_cast<>.
Modified:
cfe/trunk/lib/AST/CXXInheritance.cpp
Modified: cfe/trunk/lib/AST/CXXInheritance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CXXInheritance.cpp?rev=172558&r1=172557&r2=172558&view=diff
==============================================================================
--- cfe/trunk/lib/AST/CXXInheritance.cpp (original)
+++ cfe/trunk/lib/AST/CXXInheritance.cpp Tue Jan 15 16:09:40 2013
@@ -118,7 +118,8 @@
}
bool CXXRecordDecl::isProvablyNotDerivedFrom(const CXXRecordDecl *Base) const {
- return forallBases(BaseIsNot, (void*) Base->getCanonicalDecl());
+ return forallBases(BaseIsNot,
+ const_cast<CXXRecordDecl *>(Base->getCanonicalDecl()));
}
bool
More information about the cfe-commits
mailing list