mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 19:11:09 +01:00
Move TypeCompleter and closely related helper functions to their own file (#4922)
context.cpp is getting large, so I'm looking at a few ways to cut out clusters of functions. This felt like a logical cluster of functions to move to their own file. Note I have two commits in this PR: one moving the functionality to a new file, and one specifically changing TypeCompleter to use out-of-line function implementations. This is to assist reviewability.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "toolchain/check/merge.h"
|
||||
#include "toolchain/check/modifiers.h"
|
||||
#include "toolchain/check/name_component.h"
|
||||
#include "toolchain/check/type_completion.h"
|
||||
#include "toolchain/sem_ir/builtin_function_kind.h"
|
||||
#include "toolchain/sem_ir/entry_point.h"
|
||||
#include "toolchain/sem_ir/function.h"
|
||||
@@ -375,8 +376,8 @@ static auto CheckFunctionDefinitionSignature(Context& context,
|
||||
}
|
||||
|
||||
// The parameter types need to be complete.
|
||||
context.RequireCompleteType(
|
||||
context.insts().GetAs<SemIR::AnyParam>(param_ref_id).type_id,
|
||||
RequireCompleteType(
|
||||
context, context.insts().GetAs<SemIR::AnyParam>(param_ref_id).type_id,
|
||||
context.insts().GetLocId(param_ref_id), [&] {
|
||||
CARBON_DIAGNOSTIC(
|
||||
IncompleteTypeInFunctionParam, Error,
|
||||
|
||||
Reference in New Issue
Block a user