@@ -177,20 +177,13 @@ def note_module_odr_violation_mismatch_decl : Note<"but in '%0' found "
177177 "protected access specifier|static assert|field|method|type alias|typedef|"
178178 "data member|friend declaration|function template}1">;
179179
180- def err_module_odr_violation_mismatch_decl_diff : Error<
180+ def err_module_odr_violation_record : Error<
181181 "%q0 has different definitions in different modules; first difference is "
182182 "%select{definition in module '%2'|defined here}1 found "
183183 "%select{"
184184 "static assert with condition|"
185185 "static assert with message|"
186186 "static assert with %select{|no }4message|"
187- "field %4|"
188- "field %4 with type %5|"
189- "%select{non-|}5bitfield %4|"
190- "bitfield %4 with one width expression|"
191- "%select{non-|}5mutable field %4|"
192- "field %4 with %select{no|an}5 initalizer|"
193- "field %4 with an initializer|"
194187 "%select{method %5|constructor|destructor}4|"
195188 "%select{method %5|constructor|destructor}4 "
196189 "is %select{not deleted|deleted}6|"
@@ -226,13 +219,6 @@ def err_module_odr_violation_mismatch_decl_diff : Error<
226219 "with %select{no body|body}6|"
227220 "%select{method %5|constructor|destructor}4 "
228221 "with body|"
229- "%select{typedef|type alias}4 name %5|"
230- "%select{typedef|type alias}4 %5 with underlying type %6|"
231- "data member with name %4|"
232- "data member %4 with type %5|"
233- "data member %4 with%select{out|}5 an initializer|"
234- "data member %4 with an initializer|"
235- "data member %4 %select{is constexpr|is not constexpr}5|"
236222 "friend %select{class|function}4|"
237223 "friend %4|"
238224 "friend function %4|"
@@ -250,18 +236,11 @@ def err_module_odr_violation_mismatch_decl_diff : Error<
250236 "being a template parameter pack|"
251237 "}3">;
252238
253- def note_module_odr_violation_mismatch_decl_diff : Note<"but in '%0' found "
239+ def note_module_odr_violation_record : Note<"but in '%0' found "
254240 "%select{"
255241 "static assert with different condition|"
256242 "static assert with different message|"
257243 "static assert with %select{|no }2message|"
258- "field %2|"
259- "field %2 with type %3|"
260- "%select{non-|}3bitfield %2|"
261- "bitfield %2 with different width expression|"
262- "%select{non-|}3mutable field %2|"
263- "field %2 with %select{no|an}3 initializer|"
264- "field %2 with a different initializer|"
265244 "%select{method %3|constructor|destructor}2|"
266245 "%select{method %3|constructor|destructor}2 "
267246 "is %select{not deleted|deleted}4|"
@@ -297,13 +276,6 @@ def note_module_odr_violation_mismatch_decl_diff : Note<"but in '%0' found "
297276 "with %select{no body|body}4|"
298277 "%select{method %3|constructor|destructor}2 "
299278 "with different body|"
300- "%select{typedef|type alias}2 name %3|"
301- "%select{typedef|type alias}2 %3 with different underlying type %4|"
302- "data member with name %2|"
303- "data member %2 with different type %3|"
304- "data member %2 with%select{out|}3 an initializer|"
305- "data member %2 with a different initializer|"
306- "data member %2 %select{is constexpr|is not constexpr}3|"
307279 "friend %select{class|function}2|"
308280 "friend %2|"
309281 "friend function %2|"
@@ -321,6 +293,61 @@ def note_module_odr_violation_mismatch_decl_diff : Note<"but in '%0' found "
321293 "being a template parameter pack|"
322294 "}1">;
323295
296+ def err_module_odr_violation_field : Error<
297+ "%q0 has different definitions in different modules; first difference is "
298+ "%select{definition in module '%2'|defined here}1 found "
299+ "%select{"
300+ "field %4|"
301+ "field %4 with type %5|"
302+ "%select{non-|}5bitfield %4|"
303+ "bitfield %4 with one width expression|"
304+ "%select{non-|}5mutable field %4|"
305+ "field %4 with %select{no|an}5 initalizer|"
306+ "field %4 with an initializer"
307+ "}3">;
308+ def note_module_odr_violation_field : Note<"but in '%0' found "
309+ "%select{"
310+ "field %2|"
311+ "field %2 with type %3|"
312+ "%select{non-|}3bitfield %2|"
313+ "bitfield %2 with different width expression|"
314+ "%select{non-|}3mutable field %2|"
315+ "field %2 with %select{no|an}3 initializer|"
316+ "field %2 with a different initializer"
317+ "}1">;
318+
319+ def err_module_odr_violation_typedef : Error<
320+ "%q0 has different definitions in different modules; first difference is "
321+ "%select{definition in module '%2'|defined here}1 found "
322+ "%select{"
323+ "%select{typedef|type alias}4 name %5|"
324+ "%select{typedef|type alias}4 %5 with underlying type %6"
325+ "}3">;
326+ def note_module_odr_violation_typedef : Note<"but in '%0' found "
327+ "%select{"
328+ "%select{typedef|type alias}2 name %3|"
329+ "%select{typedef|type alias}2 %3 with different underlying type %4"
330+ "}1">;
331+
332+ def err_module_odr_violation_variable : Error<
333+ "%q0 has different definitions in different modules; first difference is "
334+ "%select{definition in module '%2'|defined here}1 found "
335+ "%select{"
336+ "data member with name %4|"
337+ "data member %4 with type %5|"
338+ "data member %4 with%select{out|}5 an initializer|"
339+ "data member %4 with an initializer|"
340+ "data member %4 %select{is constexpr|is not constexpr}5"
341+ "}3">;
342+ def note_module_odr_violation_variable : Note<"but in '%0' found "
343+ "%select{"
344+ "data member with name %2|"
345+ "data member %2 with different type %3|"
346+ "data member %2 with%select{out|}3 an initializer|"
347+ "data member %2 with a different initializer|"
348+ "data member %2 %select{is constexpr|is not constexpr}3"
349+ "}1">;
350+
324351def err_module_odr_violation_function : Error<
325352 "%q0 has different definitions in different modules; "
326353 "%select{definition in module '%2'|defined here}1 "
@@ -355,7 +382,7 @@ def err_module_odr_violation_enum : Error<
355382 "enum with specified type %4|"
356383 "enum with %4 element%s4|"
357384 "%ordinal4 element has name %5|"
358- "%ordinal4 element %5 %select{has|does not have}6 an initilizer |"
385+ "%ordinal4 element %5 %select{has|does not have}6 an initializer |"
359386 "%ordinal4 element %5 has an initializer|"
360387 "}3">;
361388
@@ -375,12 +402,14 @@ def err_module_odr_violation_mismatch_decl_unknown : Error<
375402 "%q0 %select{with definition in module '%2'|defined here}1 has different "
376403 "definitions in different modules; first difference is this "
377404 "%select{||||static assert|field|method|type alias|typedef|data member|"
378- "friend declaration|unexpected decl}3">;
405+ "friend declaration|function template|"
406+ "unexpected decl}3">;
379407def note_module_odr_violation_mismatch_decl_unknown : Note<
380408 "but in '%0' found "
381409 "%select{||||different static assert|different field|different method|"
382410 "different type alias|different typedef|different data member|"
383- "different friend declaration|another unexpected decl}1">;
411+ "different friend declaration|different function template|"
412+ "another unexpected decl}1">;
384413
385414def warn_duplicate_module_file_extension : Warning<
386415 "duplicate module file extension block name '%0'">,
0 commit comments