Submitted at revision 132831 with camelCase.<br><br><div class="gmail_quote">On Thu, Jun 9, 2011 at 4:47 PM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#FFFFFF"><div>This looks good to me, although I'd prefer if <span style="font-family:Times;font-size:medium">previous_mismatch were in camelCase. Otherwise, please commit. Thanks!</span><br>
<br>Sent from my iPhone</div><div><div></div><div class="h5"><div><br>On Jun 8, 2011, at 2:13 PM, Richard Trieu <<a href="mailto:rtrieu@google.com" target="_blank">rtrieu@google.com</a>> wrote:<br><br></div><div></div>
<blockquote type="cite"><div><div class="gmail_quote">On Tue, Jun 7, 2011 at 2:18 PM, Richard Trieu <span dir="ltr"><<a href="mailto:rtrieu@google.com" target="_blank"></a><a href="mailto:rtrieu@google.com" target="_blank">rtrieu@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div></div><div><br><br><div class="gmail_quote">On Wed, Jun 1, 2011 at 4:33 PM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com" target="_blank"></a><a href="mailto:dgregor@apple.com" target="_blank">dgregor@apple.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><br><div><div>On May 29, 2011, at 1:51 PM, Richard Trieu wrote:</div><br><blockquote type="cite"><div><span style="font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px"><pre style="font-size:12px">
<span>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><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 style="white-space:pre-wrap">      </span>- Doug</div></div><br></div></blockquote></div>

</div></div>
Not really.  I thought there was some issue with it earlier, but can't remember what it is now.  I'll test it out and see if there's any problems.</blockquote><div> </div></div>Made the following changes:<br>

<div>Templates and non-templates are now treated the same.</div><div>Added FileCheck to the test case.</div><div>Fixed issue so that definitions now check all previous declarations for mismatches.</div>
</div></blockquote></div></div><blockquote type="cite"><div><struct-class-mismatch2.patch></div></blockquote></div>
</blockquote></div><br>