Skip to content

Commit 6aaf9c8

Browse files
committed
[clang][Interp][NFC] Sanitize collectBaseOffset parameters
1 parent 703920d commit 6aaf9c8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/lib/AST/Interp/ByteCodeExprGen.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3337,6 +3337,8 @@ template <class Emitter>
33373337
unsigned
33383338
ByteCodeExprGen<Emitter>::collectBaseOffset(const RecordType *BaseType,
33393339
const RecordType *DerivedType) {
3340+
assert(BaseType);
3341+
assert(DerivedType);
33403342
const auto *FinalDecl = cast<CXXRecordDecl>(BaseType->getDecl());
33413343
const RecordDecl *CurDecl = DerivedType->getDecl();
33423344
const Record *CurRecord = getRecord(CurDecl);

0 commit comments

Comments
 (0)