<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 29, 2011, at 1:51 PM, Richard Trieu wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; "><pre id="description-edit-location" style="font-size: 12px; "><span id="desc-desc">Made changes to how 'struct'/'class' mismatches are handled.
- Removed fix-it hints from template instaniations since changes to the
templates are rarely helpful.
- Changed the caret in template instaniations from the class/struct name to the
class/struct keyword, matching the other warnings.
- Do not offer fix-it hints when multiple declarations disagree.  Warnings are
still given.
- Once a definition is found, offer a fix-it hint to all previous declarations
with wrong tag.
- Declarations that disagree with a previous definition will get a fix-it hint
to change the declaration.</span></pre></span></div></blockquote></div><div>I think this is great. I have one question:</div><div><br></div><div><div>+    if (isTemplate) {</div><div>+      Diag(NewTagLoc, diag::warn_struct_class_tag_mismatch)</div><div>+        << (NewTag == TTK_Class)</div><div>+        << isTemplate << &Name</div><div>+        << FixItHint::CreateReplacement(SourceRange(NewTagLoc),</div><div>+                                        OldTag == TTK_Class ?</div><div>+                                        "class" : "struct");</div><div>+      Diag(Previous->getLocation(), diag::note_previous_use);</div><div>+      return true;</div><div>+    }</div><div><br></div><div>Why do we bail out early for templates, rather than treating them the same way as non-templates?</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">  </span>- Doug</div></div><br></body></html>