diff --git a/toolchain/check/cpp/generate_ast.cpp b/toolchain/check/cpp/generate_ast.cpp index 0a0e721823a3..dfb4c87cfe59 100644 --- a/toolchain/check/cpp/generate_ast.cpp +++ b/toolchain/check/cpp/generate_ast.cpp @@ -395,8 +395,7 @@ auto CarbonExternalASTSource::MapInstIdToClangDecl( auto CarbonExternalASTSource::FindExternalVisibleDeclsByName( const clang::DeclContext* decl_context, clang::DeclarationName decl_name, const clang::DeclContext* /*OriginalDC*/) -> bool { - auto decl_context_inst_id = - scope_mapping.Lookup(const_cast(decl_context)); + auto decl_context_inst_id = scope_mapping.Lookup(decl_context); if (!decl_context_inst_id) { // If the context doesn't already have a mapping between C++ and Carbon,