@@ -31,11 +31,6 @@ def ExtraShardDeclsInterface : OpInterface<"ExtraShardDeclsInterface"> {
31
31
// DECL-NEXT: return (*this).someOtherMethod();
32
32
// DECL-NEXT: }
33
33
34
- // DECL: struct ExtraShardDeclsInterfaceTrait
35
- // DECL: bool sharedMethodDeclaration() {
36
- // DECL-NEXT: return (*static_cast<ConcreteOp *>(this)).someOtherMethod();
37
- // DECL-NEXT: }
38
-
39
34
def TestInheritanceMultiBaseInterface : OpInterface<"TestInheritanceMultiBaseInterface"> {
40
35
let methods = [
41
36
InterfaceMethod<
@@ -71,7 +66,7 @@ def TestInheritanceMiddleBaseInterface
71
66
def TestInheritanceZDerivedInterface
72
67
: OpInterface<"TestInheritanceZDerivedInterface", [TestInheritanceMiddleBaseInterface]>;
73
68
74
- // DECL: class TestInheritanceZDerivedInterface
69
+ // DECL: struct TestInheritanceZDerivedInterfaceInterfaceTraits
75
70
// DECL: struct Concept {
76
71
// DECL: const TestInheritanceMultiBaseInterface::Concept *implTestInheritanceMultiBaseInterface = nullptr;
77
72
// DECL-NOT: const TestInheritanceMultiBaseInterface::Concept
@@ -173,10 +168,16 @@ def DeclareMethodsWithDefaultOp : Op<TestDialect, "declare_methods_op",
173
168
// DECL: /// some function comment
174
169
// DECL: int foo(int input);
175
170
176
- // DECL-LABEL: struct TestOpInterfaceVerifyTrait
171
+ // Trait declarations / definitions come after interface definitions.
172
+ // DECL: struct ExtraShardDeclsInterfaceTrait : public
173
+ // DECL: bool sharedMethodDeclaration() {
174
+ // DECL-NEXT: return (*static_cast<ConcreteOp *>(this)).someOtherMethod();
175
+ // DECL-NEXT: }
176
+
177
+ // DECL-LABEL: struct TestOpInterfaceVerifyTrait : public
177
178
// DECL: verifyTrait
178
179
179
- // DECL-LABEL: struct TestOpInterfaceVerifyRegionTrait
180
+ // DECL-LABEL: struct TestOpInterfaceVerifyRegionTrait : public
180
181
// DECL: verifyRegionTrait
181
182
182
183
// Method implementations come last, after all class definitions.
0 commit comments