diff --git a/infra/indexer/frontend/ast_visitor.cc b/infra/indexer/frontend/ast_visitor.cc index c02074d832fb..4dea9bcf76ec 100644 --- a/infra/indexer/frontend/ast_visitor.cc +++ b/infra/indexer/frontend/ast_visitor.cc @@ -863,9 +863,9 @@ const clang::CXXRecordDecl* GetCXXRecordForType(const clang::QualType& type) { return nullptr; } const auto* record_type = derived_type->castAs(); - CHECK(record_type); + CHECK(record_type != nullptr); const clang::RecordDecl* decl = record_type->getOriginalDecl(); - CHECK(decl); + CHECK(decl != nullptr); return llvm::dyn_cast(decl); }