mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 10:01:06 +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:
@@ -5,6 +5,7 @@
|
||||
#include "toolchain/check/function.h"
|
||||
|
||||
#include "toolchain/check/merge.h"
|
||||
#include "toolchain/check/type_completion.h"
|
||||
#include "toolchain/sem_ir/ids.h"
|
||||
|
||||
namespace Carbon::Check {
|
||||
@@ -96,9 +97,9 @@ auto CheckFunctionReturnType(Context& context, SemIR::LocId loc_id,
|
||||
|
||||
// TODO: Consider suppressing the diagnostic if we've already diagnosed a
|
||||
// definition or call to this function.
|
||||
if (context.RequireConcreteType(return_info.type_id, loc_id,
|
||||
diagnose_incomplete_return_type,
|
||||
diagnose_abstract_return_type)) {
|
||||
if (RequireConcreteType(context, return_info.type_id, loc_id,
|
||||
diagnose_incomplete_return_type,
|
||||
diagnose_abstract_return_type)) {
|
||||
return_info = SemIR::ReturnTypeInfo::ForFunction(context.sem_ir(),
|
||||
function, specific_id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user