summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaExprCXX.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index 84f6f407cd3..07b0c26403a 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -2924,7 +2924,8 @@ Sema::OwningExprResult Sema::ActOnPseudoDestructorExpr(Scope *S, ExprArg Base,
// record types and dependent types matter.
void *ObjectTypePtrForLookup = 0;
if (!SS.isSet()) {
- ObjectTypePtrForLookup = (void *)ObjectType->getAs<RecordType>();
+ ObjectTypePtrForLookup = const_cast<RecordType*>(
+ ObjectType->getAs<RecordType>());
if (!ObjectTypePtrForLookup && ObjectType->isDependentType())
ObjectTypePtrForLookup = Context.DependentTy.getAsOpaquePtr();
}
OpenPOWER on IntegriCloud