@@ -114,21 +114,20 @@ enum class DeclContextKind : unsigned {
114114// / Describes the kind of a particular conformance.
115115// /
116116// / The following code involves conformances of the three different kinds:
117- // / \code
118- // / protocol P { }
119- // / protocol P2 : P { }
120117// /
121- // / class Super : P2 { }
122- // / class Sub : Super { }
123- // / \endcode
118+ // / protocol P { }
119+ // / protocol P2 : P { }
124120// /
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,
126125// / specified on the class declaration itself.
127126// /
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` .
130129// /
131- // / \c Sub conforms to \c P2 and \c P via inherited conformances,
130+ // / ` Sub` conforms to `P2` and `P` via inherited conformances,
132131// / which link back to the conformances described above.
133132// /
134133// / The enumerators are ordered in terms of decreasing preference:
@@ -137,22 +136,28 @@ enum class DeclContextKind : unsigned {
137136// / conformance kinds supersede later conformance kinds, possibly with a
138137// / diagnostic (e.g., if an inherited conformance supersedes an
139138// / 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.
140145enum class ConformanceEntryKind : unsigned {
141146 // / Inherited from a superclass conformance.
142- Inherited,
147+ Inherited = 0 ,
143148
144149 // / Explicitly specified.
145- Explicit,
150+ Explicit = 1 ,
146151
147152 // / The conformance is generated by a macro that has not been
148153 // / expanded yet.
149- PreMacroExpansion,
154+ PreMacroExpansion = 2 ,
150155
151156 // / Implicitly synthesized.
152- Synthesized,
157+ Synthesized = 3 ,
153158
154159 // / Implied by an explicitly-specified conformance.
155- Implied,
160+ Implied = 4 ,
156161
157162 Last_Kind = Implied
158163};
0 commit comments