Skip to content

Commit b174efb

Browse files
committed
assert FD before deref
1 parent 6edaf8f commit b174efb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎clang/lib/AST/ASTContext.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3095,6 +3095,7 @@ void ASTContext::setBlockVarCopyInit(const VarDecl*VD, Expr *CopyExpr,
30953095
// CppVerify contract side table accessors.
30963096
FunctionContractInfo &
30973097
ASTContext::getOrCreateFunctionContract(const FunctionDecl *FD) {
3098+
assert(FD && "Passed null params");
30983099
const FunctionDecl *Key = FD->getCanonicalDecl();
30993100
auto &Info = FunctionContracts[Key];
31003101
if (!Info)

0 commit comments

Comments
 (0)