Skip to content

Commit f651f13

Browse files
committed
[clang][Interp][NFC] Add precondition assertions
All three of these need to be non-null.
1 parent e59681d commit f651f13

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/lib/AST/Interp/Context.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ const CXXMethodDecl *
224224
Context::getOverridingFunction(const CXXRecordDecl *DynamicDecl,
225225
const CXXRecordDecl *StaticDecl,
226226
const CXXMethodDecl *InitialFunction) const {
227+
assert(DynamicDecl);
228+
assert(StaticDecl);
229+
assert(InitialFunction);
227230

228231
const CXXRecordDecl *CurRecord = DynamicDecl;
229232
const CXXMethodDecl *FoundFunction = InitialFunction;

0 commit comments

Comments
 (0)