Skip to content

Commit 5abd214

Browse files
authored
Set the location for the candidate set when looking up C++ operators (#6138)
This adds location information and prevents crashes in some cases of template instantiation in operator lookup. Removed `InCppOperatorLookup` note as it is no longer necessary. Part of #5995.
1 parent e1b87ac commit 5abd214

File tree

3 files changed

+165
-39
lines changed

3 files changed

+165
-39
lines changed

toolchain/check/cpp/operators.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "clang/Sema/Overload.h"
88
#include "clang/Sema/Sema.h"
99
#include "toolchain/check/cpp/import.h"
10+
#include "toolchain/check/cpp/location.h"
1011
#include "toolchain/check/cpp/type_mapping.h"
1112
#include "toolchain/check/inst.h"
1213
#include "toolchain/check/type.h"
@@ -157,12 +158,11 @@ static auto GetClangOperatorKind(Context& context, SemIR::LocId loc_id,
157158

158159
auto LookupCppOperator(Context& context, SemIR::LocId loc_id, Operator op,
159160
llvm::ArrayRef<SemIR::InstId> arg_ids) -> SemIR::InstId {
160-
Diagnostics::AnnotationScope annotate_diagnostics(
161-
&context.emitter(), [&](auto& builder) {
162-
CARBON_DIAGNOSTIC(InCppOperatorLookup, Note,
163-
"in `Cpp` operator `{0}` lookup", std::string);
164-
builder.Note(loc_id, InCppOperatorLookup, op.interface_name.str());
165-
});
161+
// Register an annotation scope to flush any Clang diagnostics when we return.
162+
// This is important to ensure that Clang diagnostics are properly interleaved
163+
// with Carbon diagnostics.
164+
Diagnostics::AnnotationScope annotate_diagnostics(&context.emitter(),
165+
[](auto& /*builder*/) {});
166166

167167
auto op_kind =
168168
GetClangOperatorKind(context, loc_id, op.interface_name, op.op_name);
@@ -191,9 +191,9 @@ auto LookupCppOperator(Context& context, SemIR::LocId loc_id, Operator op,
191191
}
192192

193193
clang::UnresolvedSet<4> functions;
194-
// TODO: Add location accordingly.
195194
clang::OverloadCandidateSet candidate_set(
196-
clang::SourceLocation(), clang::OverloadCandidateSet::CSK_Operator);
195+
GetCppLocation(context, loc_id),
196+
clang::OverloadCandidateSet::CSK_Operator);
197197
// This works for both unary and binary operators.
198198
context.clang_sema().LookupOverloadedBinOp(candidate_set, *op_kind, functions,
199199
*arg_exprs);

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

Lines changed: 157 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -462,10 +462,7 @@ fn F() {
462462
var c1: Cpp.C = Cpp.C.C();
463463

464464
// Bitwise.
465-
// CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+11]]:3: error: semantics TODO: `Unsupported operator interface `LeftShiftAssignWith`` [SemanticsTodo]
466-
// CHECK:STDERR: c1 <<= 1;
467-
// CHECK:STDERR: ^~~~~~~~
468-
// CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+8]]:3: note: in `Cpp` operator `LeftShiftAssignWith` lookup [InCppOperatorLookup]
465+
// CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+8]]:3: error: semantics TODO: `Unsupported operator interface `LeftShiftAssignWith`` [SemanticsTodo]
469466
// CHECK:STDERR: c1 <<= 1;
470467
// CHECK:STDERR: ^~~~~~~~
471468
// CHECK:STDERR:
@@ -474,10 +471,7 @@ fn F() {
474471
// CHECK:STDERR: ^~~~~~~~
475472
// CHECK:STDERR:
476473
c1 <<= 1;
477-
// CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+11]]:3: error: semantics TODO: `Unsupported operator interface `RightShiftAssignWith`` [SemanticsTodo]
478-
// CHECK:STDERR: c1 >>= 2;
479-
// CHECK:STDERR: ^~~~~~~~
480-
// CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+8]]:3: note: in `Cpp` operator `RightShiftAssignWith` lookup [InCppOperatorLookup]
474+
// CHECK:STDERR: fail_todo_import_unsupported_binary_operators.carbon:[[@LINE+8]]:3: error: semantics TODO: `Unsupported operator interface `RightShiftAssignWith`` [SemanticsTodo]
481475
// CHECK:STDERR: c1 >>= 2;
482476
// CHECK:STDERR: ^~~~~~~~
483477
// CHECK:STDERR:
@@ -770,16 +764,13 @@ library "[[@TEST_NAME]]";
770764
import Cpp library "incomplete.h";
771765

772766
fn F() {
773-
// CHECK:STDERR: fail_import_incomplete_unary.carbon:[[@LINE+11]]:27: error: looking up a C++ operator with incomplete operand type `Cpp.Incomplete` [IncompleteOperandTypeInCppOperatorLookup]
767+
// CHECK:STDERR: fail_import_incomplete_unary.carbon:[[@LINE+8]]:27: error: looking up a C++ operator with incomplete operand type `Cpp.Incomplete` [IncompleteOperandTypeInCppOperatorLookup]
774768
// CHECK:STDERR: let result_unary: i32 = -*Cpp.CreateIncomplete();
775769
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
776770
// CHECK:STDERR: fail_import_incomplete_unary.carbon:[[@LINE-6]]:10: in file included here [InCppInclude]
777771
// CHECK:STDERR: ./incomplete.h:2:7: note: class was forward declared here [ClassForwardDeclaredHere]
778772
// CHECK:STDERR: class Incomplete;
779773
// CHECK:STDERR: ^
780-
// CHECK:STDERR: fail_import_incomplete_unary.carbon:[[@LINE+4]]:27: note: in `Cpp` operator `Negate` lookup [InCppOperatorLookup]
781-
// CHECK:STDERR: let result_unary: i32 = -*Cpp.CreateIncomplete();
782-
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
783774
// CHECK:STDERR:
784775
let result_unary: i32 = -*Cpp.CreateIncomplete();
785776
}
@@ -792,16 +783,13 @@ import Cpp library "incomplete.h";
792783

793784
fn F() {
794785
var complete: Cpp.Complete = Cpp.Complete.Complete();
795-
// CHECK:STDERR: fail_import_incomplete_binary.carbon:[[@LINE+11]]:28: error: looking up a C++ operator with incomplete operand type `Cpp.Incomplete` [IncompleteOperandTypeInCppOperatorLookup]
786+
// CHECK:STDERR: fail_import_incomplete_binary.carbon:[[@LINE+8]]:28: error: looking up a C++ operator with incomplete operand type `Cpp.Incomplete` [IncompleteOperandTypeInCppOperatorLookup]
796787
// CHECK:STDERR: let result_binary: i32 = complete + *Cpp.CreateIncomplete();
797788
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
798789
// CHECK:STDERR: fail_import_incomplete_binary.carbon:[[@LINE-7]]:10: in file included here [InCppInclude]
799790
// CHECK:STDERR: ./incomplete.h:2:7: note: class was forward declared here [ClassForwardDeclaredHere]
800791
// CHECK:STDERR: class Incomplete;
801792
// CHECK:STDERR: ^
802-
// CHECK:STDERR: fail_import_incomplete_binary.carbon:[[@LINE+4]]:28: note: in `Cpp` operator `AddWith` lookup [InCppOperatorLookup]
803-
// CHECK:STDERR: let result_binary: i32 = complete + *Cpp.CreateIncomplete();
804-
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
805793
// CHECK:STDERR:
806794
let result_binary: i32 = complete + *Cpp.CreateIncomplete();
807795
}
@@ -825,15 +813,12 @@ fn CreateIncomplete() -> Incomplete*;
825813

826814
fn F() {
827815
var complete: Cpp.Complete = Cpp.Complete.Complete();
828-
// CHECK:STDERR: fail_incomplete_operand_carbon_type.carbon:[[@LINE+10]]:21: error: looking up a C++ operator with incomplete operand type `Incomplete` [IncompleteOperandTypeInCppOperatorLookup]
816+
// CHECK:STDERR: fail_incomplete_operand_carbon_type.carbon:[[@LINE+7]]:21: error: looking up a C++ operator with incomplete operand type `Incomplete` [IncompleteOperandTypeInCppOperatorLookup]
829817
// CHECK:STDERR: let result: i32 = *CreateIncomplete() + complete;
830818
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
831819
// CHECK:STDERR: fail_incomplete_operand_carbon_type.carbon:[[@LINE-8]]:1: note: class was forward declared here [ClassForwardDeclaredHere]
832820
// CHECK:STDERR: class Incomplete;
833821
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
834-
// CHECK:STDERR: fail_incomplete_operand_carbon_type.carbon:[[@LINE+4]]:21: note: in `Cpp` operator `AddWith` lookup [InCppOperatorLookup]
835-
// CHECK:STDERR: let result: i32 = *CreateIncomplete() + complete;
836-
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
837822
// CHECK:STDERR:
838823
let result: i32 = *CreateIncomplete() + complete;
839824
}
@@ -858,13 +843,10 @@ library "[[@TEST_NAME]]";
858843
import Cpp library "unsupported_in_instantiation.h";
859844

860845
fn F() {
861-
// CHECK:STDERR: fail_import_unsupported_in_instantiation_unary.carbon:[[@LINE+10]]:21: error: semantics TODO: `class with virtual bases` [SemanticsTodo]
862-
// CHECK:STDERR: let result: i32 = -Cpp.unsupported;
863-
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
864-
// CHECK:STDERR: fail_import_unsupported_in_instantiation_unary.carbon:[[@LINE+7]]:21: note: while completing C++ type `Cpp.Unsupported` [InCppTypeCompletion]
846+
// CHECK:STDERR: fail_import_unsupported_in_instantiation_unary.carbon:[[@LINE+7]]:21: error: semantics TODO: `class with virtual bases` [SemanticsTodo]
865847
// CHECK:STDERR: let result: i32 = -Cpp.unsupported;
866848
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
867-
// CHECK:STDERR: fail_import_unsupported_in_instantiation_unary.carbon:[[@LINE+4]]:21: note: in `Cpp` operator `Negate` lookup [InCppOperatorLookup]
849+
// CHECK:STDERR: fail_import_unsupported_in_instantiation_unary.carbon:[[@LINE+4]]:21: note: while completing C++ type `Cpp.Unsupported` [InCppTypeCompletion]
868850
// CHECK:STDERR: let result: i32 = -Cpp.unsupported;
869851
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
870852
// CHECK:STDERR:
@@ -879,19 +861,70 @@ import Cpp library "unsupported_in_instantiation.h";
879861

880862
fn F() {
881863
var supported: Cpp.Supported = Cpp.Supported.Supported();
882-
// CHECK:STDERR: fail_import_unsupported_in_instantiation_binary.carbon:[[@LINE+10]]:21: error: semantics TODO: `class with virtual bases` [SemanticsTodo]
864+
// CHECK:STDERR: fail_import_unsupported_in_instantiation_binary.carbon:[[@LINE+7]]:21: error: semantics TODO: `class with virtual bases` [SemanticsTodo]
883865
// CHECK:STDERR: let result: i32 = supported + Cpp.unsupported;
884866
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
885-
// CHECK:STDERR: fail_import_unsupported_in_instantiation_binary.carbon:[[@LINE+7]]:21: note: while completing C++ type `Cpp.Unsupported` [InCppTypeCompletion]
886-
// CHECK:STDERR: let result: i32 = supported + Cpp.unsupported;
887-
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
888-
// CHECK:STDERR: fail_import_unsupported_in_instantiation_binary.carbon:[[@LINE+4]]:21: note: in `Cpp` operator `AddWith` lookup [InCppOperatorLookup]
867+
// CHECK:STDERR: fail_import_unsupported_in_instantiation_binary.carbon:[[@LINE+4]]:21: note: while completing C++ type `Cpp.Unsupported` [InCppTypeCompletion]
889868
// CHECK:STDERR: let result: i32 = supported + Cpp.unsupported;
890869
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
891870
// CHECK:STDERR:
892871
let result: i32 = supported + Cpp.unsupported;
893872
}
894873

874+
// ============================================================================
875+
// Indirect template instantiation
876+
// ============================================================================
877+
878+
// --- indirect_template_instantiation.carbon
879+
880+
library "[[@TEST_NAME]]";
881+
882+
import Cpp inline '''
883+
template<typename T> struct B {};
884+
template<typename T> struct A {};
885+
886+
using X = B<A<int>>;
887+
int operator+(X, X);
888+
''';
889+
890+
fn F(x: Cpp.X) -> i32 {
891+
//@dump-sem-ir-begin
892+
return x + x;
893+
//@dump-sem-ir-end
894+
}
895+
896+
// ============================================================================
897+
// Indirect template instantiation error
898+
// ============================================================================
899+
900+
// --- fail_indirect_template_instantiation_error.carbon
901+
902+
library "[[@TEST_NAME]]";
903+
904+
import Cpp inline '''
905+
template<typename T> struct B {};
906+
template<typename T> struct A {
907+
// CHECK:STDERR: fail_indirect_template_instantiation_error.carbon:[[@LINE+3]]:19: error: type 'int' cannot be used prior to '::' because it has no members [CppInteropParseError]
908+
// CHECK:STDERR: 10 | friend typename T::error operator+(B<A>, B<A>);
909+
// CHECK:STDERR: | ^
910+
friend typename T::error operator+(B<A>, B<A>);
911+
};
912+
913+
using X = B<A<int>>;
914+
''';
915+
916+
fn F(x: Cpp.X) -> i32 {
917+
// CHECK:STDERR: fail_indirect_template_instantiation_error.carbon:[[@LINE+8]]:12: note: in instantiation of template class 'A<int>' requested here [CppInteropParseNote]
918+
// CHECK:STDERR: 25 | return x + x;
919+
// CHECK:STDERR: | ^
920+
// CHECK:STDERR:
921+
// CHECK:STDERR: fail_indirect_template_instantiation_error.carbon:[[@LINE+4]]:12: error: no matching function for call to '<C++ operator>' [CppInteropParseError]
922+
// CHECK:STDERR: 25 | return x + x;
923+
// CHECK:STDERR: | ^
924+
// CHECK:STDERR:
925+
return x + x;
926+
}
927+
895928
// ============================================================================
896929
// Operator overloading
897930
// ============================================================================
@@ -912,7 +945,9 @@ import Cpp library "overloading.h";
912945
fn F() {
913946
let c1: Cpp.C = Cpp.C.C();
914947
let c2: Cpp.C = Cpp.C.C();
948+
//@dump-sem-ir-begin
915949
let c3: Cpp.C = c1 + c2;
950+
//@dump-sem-ir-end
916951
}
917952

918953
// CHECK:STDOUT: --- import_unary_operators.carbon
@@ -2883,3 +2918,95 @@ fn F() {
28832918
// CHECK:STDOUT: <elided>
28842919
// CHECK:STDOUT: }
28852920
// CHECK:STDOUT:
2921+
// CHECK:STDOUT: --- indirect_template_instantiation.carbon
2922+
// CHECK:STDOUT:
2923+
// CHECK:STDOUT: constants {
2924+
// CHECK:STDOUT: %B: type = class_type @B [concrete]
2925+
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
2926+
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
2927+
// CHECK:STDOUT: %ptr.a04: type = ptr_type %B [concrete]
2928+
// CHECK:STDOUT: %operator+__carbon_thunk.type: type = fn_type @operator+__carbon_thunk [concrete]
2929+
// CHECK:STDOUT: %operator+__carbon_thunk: %operator+__carbon_thunk.type = struct_value () [concrete]
2930+
// CHECK:STDOUT: }
2931+
// CHECK:STDOUT:
2932+
// CHECK:STDOUT: imports {
2933+
// CHECK:STDOUT: %operator+__carbon_thunk.decl: %operator+__carbon_thunk.type = fn_decl @operator+__carbon_thunk [concrete = constants.%operator+__carbon_thunk] {
2934+
// CHECK:STDOUT: <elided>
2935+
// CHECK:STDOUT: } {
2936+
// CHECK:STDOUT: <elided>
2937+
// CHECK:STDOUT: }
2938+
// CHECK:STDOUT: }
2939+
// CHECK:STDOUT:
2940+
// CHECK:STDOUT: fn @F(%x.param: %B) -> %i32 {
2941+
// CHECK:STDOUT: !entry:
2942+
// CHECK:STDOUT: %x.ref.loc14_10: %B = name_ref x, %x
2943+
// CHECK:STDOUT: %x.ref.loc14_14: %B = name_ref x, %x
2944+
// CHECK:STDOUT: %.loc14_10: ref %B = value_as_ref %x.ref.loc14_10
2945+
// CHECK:STDOUT: %addr.loc14_12.1: %ptr.a04 = addr_of %.loc14_10
2946+
// CHECK:STDOUT: %.loc14_14: ref %B = value_as_ref %x.ref.loc14_14
2947+
// CHECK:STDOUT: %addr.loc14_12.2: %ptr.a04 = addr_of %.loc14_14
2948+
// CHECK:STDOUT: %operator+__carbon_thunk.call: init %i32 = call imports.%operator+__carbon_thunk.decl(%addr.loc14_12.1, %addr.loc14_12.2)
2949+
// CHECK:STDOUT: return %operator+__carbon_thunk.call to %return
2950+
// CHECK:STDOUT: }
2951+
// CHECK:STDOUT:
2952+
// CHECK:STDOUT: --- import_overloading.carbon
2953+
// CHECK:STDOUT:
2954+
// CHECK:STDOUT: constants {
2955+
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
2956+
// CHECK:STDOUT: %C: type = class_type @C [concrete]
2957+
// CHECK:STDOUT: %pattern_type.217: type = pattern_type %C [concrete]
2958+
// CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete]
2959+
// CHECK:STDOUT: %operator+__carbon_thunk.type: type = fn_type @operator+__carbon_thunk [concrete]
2960+
// CHECK:STDOUT: %operator+__carbon_thunk: %operator+__carbon_thunk.type = struct_value () [concrete]
2961+
// CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
2962+
// CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete]
2963+
// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
2964+
// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete]
2965+
// CHECK:STDOUT: }
2966+
// CHECK:STDOUT:
2967+
// CHECK:STDOUT: imports {
2968+
// CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
2969+
// CHECK:STDOUT: .C = %C.decl
2970+
// CHECK:STDOUT: import Cpp//...
2971+
// CHECK:STDOUT: }
2972+
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
2973+
// CHECK:STDOUT: %operator+__carbon_thunk.decl: %operator+__carbon_thunk.type = fn_decl @operator+__carbon_thunk [concrete = constants.%operator+__carbon_thunk] {
2974+
// CHECK:STDOUT: <elided>
2975+
// CHECK:STDOUT: } {
2976+
// CHECK:STDOUT: <elided>
2977+
// CHECK:STDOUT: }
2978+
// CHECK:STDOUT: }
2979+
// CHECK:STDOUT:
2980+
// CHECK:STDOUT: fn @F() {
2981+
// CHECK:STDOUT: !entry:
2982+
// CHECK:STDOUT: <elided>
2983+
// CHECK:STDOUT: name_binding_decl {
2984+
// CHECK:STDOUT: %c3.patt: %pattern_type.217 = binding_pattern c3 [concrete]
2985+
// CHECK:STDOUT: }
2986+
// CHECK:STDOUT: %c1.ref: %C = name_ref c1, %c1
2987+
// CHECK:STDOUT: %c2.ref: %C = name_ref c2, %c2
2988+
// CHECK:STDOUT: %.loc10_22.1: ref %C = temporary_storage
2989+
// CHECK:STDOUT: %.loc10_19: ref %C = value_as_ref %c1.ref
2990+
// CHECK:STDOUT: %addr.loc10_22.1: %ptr.d9e = addr_of %.loc10_19
2991+
// CHECK:STDOUT: %.loc10_24: ref %C = value_as_ref %c2.ref
2992+
// CHECK:STDOUT: %addr.loc10_22.2: %ptr.d9e = addr_of %.loc10_24
2993+
// CHECK:STDOUT: %addr.loc10_22.3: %ptr.d9e = addr_of %.loc10_22.1
2994+
// CHECK:STDOUT: %operator+__carbon_thunk.call: init %empty_tuple.type = call imports.%operator+__carbon_thunk.decl(%addr.loc10_22.1, %addr.loc10_22.2, %addr.loc10_22.3)
2995+
// CHECK:STDOUT: %.loc10_22.2: init %C = in_place_init %operator+__carbon_thunk.call, %.loc10_22.1
2996+
// CHECK:STDOUT: %.loc10_14: type = splice_block %C.ref.loc10 [concrete = constants.%C] {
2997+
// CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
2998+
// CHECK:STDOUT: %C.ref.loc10: type = name_ref C, imports.%C.decl [concrete = constants.%C]
2999+
// CHECK:STDOUT: }
3000+
// CHECK:STDOUT: %.loc10_22.3: ref %C = temporary %.loc10_22.1, %.loc10_22.2
3001+
// CHECK:STDOUT: %.loc10_22.4: %C = bind_value %.loc10_22.3
3002+
// CHECK:STDOUT: %c3: %C = bind_name c3, %.loc10_22.4
3003+
// CHECK:STDOUT: %facet_value.loc10: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
3004+
// CHECK:STDOUT: %.loc10_22.5: %type_where = converted constants.%C, %facet_value.loc10 [concrete = constants.%facet_value]
3005+
// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10: <bound method> = bound_method %.loc10_22.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
3006+
// CHECK:STDOUT: <elided>
3007+
// CHECK:STDOUT: %bound_method.loc10: <bound method> = bound_method %.loc10_22.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1
3008+
// CHECK:STDOUT: %addr.loc10_22.4: %ptr.d9e = addr_of %.loc10_22.3
3009+
// CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10(%addr.loc10_22.4)
3010+
// CHECK:STDOUT: <elided>
3011+
// CHECK:STDOUT: }
3012+
// CHECK:STDOUT:

toolchain/diagnostics/diagnostic_kind.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ CARBON_DIAGNOSTIC_KIND(QualifiedDeclInUndefinedInterfaceScope)
360360

361361
// Name lookup.
362362
CARBON_DIAGNOSTIC_KIND(InCppNameLookup)
363-
CARBON_DIAGNOSTIC_KIND(InCppOperatorLookup)
364363
CARBON_DIAGNOSTIC_KIND(InNameLookup)
365364
CARBON_DIAGNOSTIC_KIND(IncompleteOperandTypeInCppOperatorLookup)
366365
CARBON_DIAGNOSTIC_KIND(NameAmbiguousDueToExtend)

0 commit comments

Comments
 (0)