Skip to content

Commit e48e4db

Browse files
committed
Fix up after suggestions.
1 parent cc868af commit e48e4db

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

toolchain/check/cpp/import.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1697,7 +1697,7 @@ auto ImportCppFunctionDecl(Context& context, SemIR::LocId loc_id,
16971697
Diagnostics::AnnotationScope annotate_diagnostics(
16981698
&context.emitter(), [&](auto& builder) {
16991699
CARBON_DIAGNOSTIC(InCppThunk, Note,
1700-
"in thunk for Cpp function used here");
1700+
"in thunk for C++ function used here");
17011701
builder.Note(loc_id, InCppThunk);
17021702
});
17031703

toolchain/check/cpp/location.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ auto GetCppLocation(Context& context, SemIR::LocId loc_id)
4343
// final entry.
4444
auto absolute_node_id = absolute_node_ids.back();
4545
const auto* ir = GetFile(context, absolute_node_id.check_ir_id());
46-
CHECK(ir, "Node location points at nonexistent IR");
46+
CARBON_CHECK(ir, "Node location points at nonexistent IR");
4747
const auto& tree = ir->parse_tree();
4848
const auto& source = tree.tokens().source();
4949
auto offset =
@@ -56,7 +56,7 @@ auto GetCppLocation(Context& context, SemIR::LocId loc_id)
5656
auto file = src_mgr.getFileManager().getOptionalFileRef(source.filename());
5757
if (!file) {
5858
file = src_mgr.getFileManager().getVirtualFileRef(
59-
source.filename(), source.text.size(), /*ModificationTime=*/0);
59+
source.filename(), source.text().size(), /*ModificationTime=*/0);
6060
}
6161
src_mgr.overrideFileContents(
6262
*file, llvm::MemoryBufferRef(source.text(), source.filename()));

toolchain/check/testdata/interop/cpp/function/class.carbon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ import Cpp library "non_copyable_param_type.h";
153153

154154
fn F() {
155155
//@dump-sem-ir-begin
156-
// CHECK:STDERR: fail_import_non_copyable_param_type.carbon:[[@LINE+4]]:3: note: in thunk for Cpp function used here [InCppThunk]
156+
// CHECK:STDERR: fail_import_non_copyable_param_type.carbon:[[@LINE+4]]:3: note: in thunk for C++ function used here [InCppThunk]
157157
// CHECK:STDERR: Cpp.foo({} as Cpp.C);
158158
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
159159
// CHECK:STDERR:
@@ -414,7 +414,7 @@ library "[[@TEST_NAME]]";
414414
import Cpp library "decl_value_return_type.h";
415415

416416
fn F() {
417-
// CHECK:STDERR: fail_import_decl_value_return_type.carbon:[[@LINE+13]]:3: note: in thunk for Cpp function used here [InCppThunk]
417+
// CHECK:STDERR: fail_import_decl_value_return_type.carbon:[[@LINE+13]]:3: note: in thunk for C++ function used here [InCppThunk]
418418
// CHECK:STDERR: Cpp.foo();
419419
// CHECK:STDERR: ^~~~~~~~~
420420
// CHECK:STDERR:

toolchain/check/testdata/interop/cpp/function/struct.carbon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ import Cpp library "non_copyable_param_type.h";
153153

154154
fn F() {
155155
//@dump-sem-ir-begin
156-
// CHECK:STDERR: fail_import_non_copyable_param_type.carbon:[[@LINE+4]]:3: note: in thunk for Cpp function used here [InCppThunk]
156+
// CHECK:STDERR: fail_import_non_copyable_param_type.carbon:[[@LINE+4]]:3: note: in thunk for C++ function used here [InCppThunk]
157157
// CHECK:STDERR: Cpp.foo({} as Cpp.S);
158158
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
159159
// CHECK:STDERR:
@@ -413,7 +413,7 @@ library "[[@TEST_NAME]]";
413413
import Cpp library "decl_value_return_type.h";
414414

415415
fn F() {
416-
// CHECK:STDERR: fail_import_decl_value_return_type.carbon:[[@LINE+13]]:3: note: in thunk for Cpp function used here [InCppThunk]
416+
// CHECK:STDERR: fail_import_decl_value_return_type.carbon:[[@LINE+13]]:3: note: in thunk for C++ function used here [InCppThunk]
417417
// CHECK:STDERR: Cpp.foo();
418418
// CHECK:STDERR: ^~~~~~~~~
419419
// CHECK:STDERR:

toolchain/check/testdata/interop/cpp/function/union.carbon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ library "[[@TEST_NAME]]";
375375
import Cpp library "decl_value_return_type.h";
376376

377377
fn F() {
378-
// CHECK:STDERR: fail_import_decl_value_return_type.carbon:[[@LINE+13]]:3: note: in thunk for Cpp function used here [InCppThunk]
378+
// CHECK:STDERR: fail_import_decl_value_return_type.carbon:[[@LINE+13]]:3: note: in thunk for C++ function used here [InCppThunk]
379379
// CHECK:STDERR: Cpp.foo();
380380
// CHECK:STDERR: ^~~~~~~~~
381381
// CHECK:STDERR:

0 commit comments

Comments
 (0)