aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/Compiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/ByteCode/Compiler.cpp')
-rw-r--r--clang/lib/AST/ByteCode/Compiler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp
index 3e53f2a..7cba0e8 100644
--- a/clang/lib/AST/ByteCode/Compiler.cpp
+++ b/clang/lib/AST/ByteCode/Compiler.cpp
@@ -2990,6 +2990,8 @@ bool Compiler<Emitter>::VisitCXXReinterpretCastExpr(
if (PointeeToT && PointeeFromT) {
if (isIntegralType(*PointeeFromT) && isIntegralType(*PointeeToT))
Fatal = false;
+ } else {
+ Fatal = SubExpr->getType().getTypePtr() != E->getType().getTypePtr();
}
if (!this->emitInvalidCast(CastKind::Reinterpret, Fatal, E))