Author: Timm Bäder
Date: 2022-10-26T08:49:31+02:00
New Revision: 751f1bfb5f77dfab27456c6964721ed3a4f9f896
URL: 
https://github.com/llvm/llvm-project/commit/751f1bfb5f77dfab27456c6964721ed3a4f9f896
DIFF: 
https://github.com/llvm/llvm-project/commit/751f1bfb5f77dfab27456c6964721ed3a4f9f896.diff

LOG: [clang][Interp][NFC] Assert we have a valid Record instance

Added: 
    

Modified: 
    clang/lib/AST/Interp/ByteCodeStmtGen.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/ByteCodeStmtGen.cpp 
b/clang/lib/AST/Interp/ByteCodeStmtGen.cpp
index 4f54193dcf3a..bdb072c3b0aa 100644
--- a/clang/lib/AST/Interp/ByteCodeStmtGen.cpp
+++ b/clang/lib/AST/Interp/ByteCodeStmtGen.cpp
@@ -98,6 +98,7 @@ bool ByteCodeStmtGen<Emitter>::visitFunc(const FunctionDecl 
*F) {
   if (const auto Ctor = dyn_cast<CXXConstructorDecl>(F)) {
     const RecordDecl *RD = Ctor->getParent();
     const Record *R = this->getRecord(RD);
+    assert(R);
 
     for (const auto *Init : Ctor->inits()) {
       const Expr *InitExpr = Init->getInit();


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to