Skip to content

Commit

Permalink
[clang][Interp][NFC] Sanitize collectBaseOffset parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaederr committed Mar 19, 2024
1 parent 703920d commit 6aaf9c8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clang/lib/AST/Interp/ByteCodeExprGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3337,6 +3337,8 @@ template <class Emitter>
unsigned
ByteCodeExprGen<Emitter>::collectBaseOffset(const RecordType *BaseType,
const RecordType *DerivedType) {
assert(BaseType);
assert(DerivedType);
const auto *FinalDecl = cast<CXXRecordDecl>(BaseType->getDecl());
const RecordDecl *CurDecl = DerivedType->getDecl();
const Record *CurRecord = getRecord(CurDecl);
Expand Down

0 comments on commit 6aaf9c8

Please sign in to comment.