<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br><div><div>On Jan 7, 2013, at 18:59 , Jordan Rose <<a href="mailto:jordan_rose@apple.com">jordan_rose@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, everyone. One thing that's bothered me about our diagnostic TableGen files is the anonymous use of warning groups:<div><br></div><div>def warn_foo : Warning<"foo is bad">, InGroup<DiagGroup<"foo">>;</div><div>def warn_foo_cxx : Warning<"foo is even worse in C++">, InGroup<DiagGroup<"foo">>;</div><div><br></div><div>If we ever want to put the warning groups in a hierarchy, or change the name, there's a big chance we'll miss one.</div><div><br></div><div>So, I wrote a new warning for clang-tblgen, which even has a fixit if the group already has a name:</div><div><br></div><div>warning: group 'foo' is referred to anonymously</div><div><font face="Courier">def warn_foo : Warning<"foo is bad">, InGroup<DiagGroup<"foo">>;</font></div><div><font face="Courier">                                      ~~~~~~~~^~~~~~~~~~~~~~~~~</font></div><div><font face="Courier">                                      InGroup<Foo></font></div><div><font face="Courier"><br></font></div><div>And then fixed all the warnings, with the intent that we make this a new style requirement going forwards: groups that cover more than one diagnostic must be named.</div><div><br></div><div>This depends on the changes being discussed in <a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130107/161252.html">http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130107/161252.html</a>, but what do people think of this?</div><div><br></div><div>Thanks,</div><div>Jordan</div><div><br></div><div></div></div><span><0001-Warn-if-an-anonymous-DiagGroup-is-referenced-multipl.patch></span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div></div></div><span><0002-Diagnostics-name-all-implicit-groups-used-more-than-.patch></span><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div></div></div></blockquote></div><br></div></body></html>