@@ -114,21 +114,20 @@ enum class DeclContextKind : unsigned {
114
114
// / Describes the kind of a particular conformance.
115
115
// /
116
116
// / The following code involves conformances of the three different kinds:
117
- // / \code
118
- // / protocol P { }
119
- // / protocol P2 : P { }
120
117
// /
121
- // / class Super : P2 { }
122
- // / class Sub : Super { }
123
- // / \endcode
118
+ // / protocol P { }
119
+ // / protocol P2 : P { }
124
120
// /
125
- // / \c Super conforms to \c P2 via an explicit conformance,
121
+ // / class Super : P2 { }
122
+ // / class Sub : Super { }
123
+ // /
124
+ // / `Super` conforms to `P2` via an explicit conformance,
126
125
// / specified on the class declaration itself.
127
126
// /
128
- // / \c Super conforms to \c P via an implied conformance, whose
129
- // / origin is the explicit conformance to \c P2 .
127
+ // / ` Super` conforms to `P` via an implied conformance, whose
128
+ // / origin is the explicit conformance to `P2` .
130
129
// /
131
- // / \c Sub conforms to \c P2 and \c P via inherited conformances,
130
+ // / ` Sub` conforms to `P2` and `P` via inherited conformances,
132
131
// / which link back to the conformances described above.
133
132
// /
134
133
// / The enumerators are ordered in terms of decreasing preference:
@@ -137,22 +136,28 @@ enum class DeclContextKind : unsigned {
137
136
// / conformance kinds supersede later conformance kinds, possibly with a
138
137
// / diagnostic (e.g., if an inherited conformance supersedes an
139
138
// / explicit conformance).
139
+ // /
140
+ // / - Important: The raw values of these cases are relied upon by
141
+ // / `declared_protocol_conformance_here`.
142
+ // / - If you add a new case, give it an explicit raw value.
143
+ // / - If you change the cases, make sure they remain in sync with the
144
+ // / aforementioned diagnostic.
140
145
enum class ConformanceEntryKind : unsigned {
141
146
// / Inherited from a superclass conformance.
142
- Inherited,
147
+ Inherited = 0 ,
143
148
144
149
// / Explicitly specified.
145
- Explicit,
150
+ Explicit = 1 ,
146
151
147
152
// / The conformance is generated by a macro that has not been
148
153
// / expanded yet.
149
- PreMacroExpansion,
154
+ PreMacroExpansion = 2 ,
150
155
151
156
// / Implicitly synthesized.
152
- Synthesized,
157
+ Synthesized = 3 ,
153
158
154
159
// / Implied by an explicitly-specified conformance.
155
- Implied,
160
+ Implied = 4 ,
156
161
157
162
Last_Kind = Implied
158
163
};
0 commit comments