Factor out a Check::CppContext holding C++-specific check state (#6482)

* Move `Sema` access from `CppFile` into `CppContext`.
* Move the mangle context from `SemIR::File` into `CppContext`.
* Move source location mapping state from `Context` into `CppContext`.

Also factor out the `GenerateAst` function that builds the `CppContext`
and `CppFile` into its own file.
This commit is contained in:
Richard Smith authored and GitHub committed 2025-12-10 18:55:22 +00:00
1 parent bf45b1cbf5
commit 6114df59ee
13 files changed
+512 -381

No files matched your search

+1 -1
View File
@@ -349,7 +349,7 @@ static auto CreateThunkFunctionDecl(
thunk_function_decl->addAttr(clang::AsmLabelAttr::CreateImplicit(
ast_context,
GenerateThunkMangledName(
*context.sem_ir().clang_mangle_context(), *callee_info.decl,
context.cpp_context()->clang_mangle_context(), *callee_info.decl,
callee_info.num_params - callee_info.has_explicit_object_parameter()),
clang_loc));