[clang][Interp][NFC] Add a debugging assertion
authorTimm Bäder <tbaeder@redhat.com>
Thu, 20 Jul 2023 08:51:29 +0000 (10:51 +0200)
committerTimm Bäder <tbaeder@redhat.com>
Thu, 20 Jul 2023 12:06:09 +0000 (14:06 +0200)
We will probably have to remove this at some point, but until then, make
sure we're not running into much-harder-to-debug problems later on.

clang/lib/AST/Interp/ByteCodeExprGen.cpp

index c6c4c78..ad83875 100644 (file)
@@ -1806,6 +1806,7 @@ bool ByteCodeExprGen<Emitter>::VisitCXXMemberCallExpr(
 template <class Emitter>
 bool ByteCodeExprGen<Emitter>::VisitCXXDefaultInitExpr(
     const CXXDefaultInitExpr *E) {
+  assert(classify(E->getType()));
   return this->visit(E->getExpr());
 }