<div class="gmail_quote">On Mon, May 2, 2011 at 11:33 AM, Argyrios Kyrtzidis <span dir="ltr"><<a href="mailto:kyrtzidis@apple.com">kyrtzidis@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 class="im"><br>
On Apr 29, 2011, at 7:48 PM, Richard T wrote:<br>
<br>
> Moved the logic for checking undefined behavior and its warnings into CheckCompatibleReinterpretCast().  Also, cleaned up the test case a little.<br>
<br>
</div>Thanks! Submitted in r130703 with a tweak; I changed<br>
<br>
+  if (Diags.getDiagnosticLevel(DiagID, SourceLocation()) ==<br>
+          Diagnostic::Ignored) {<br>
<br>
to<br>
<br>
+  if (Diags.getDiagnosticLevel(DiagID, Range.getBegin()) ==<br>
+          Diagnostic::Ignored) {<br>
<br>
FYI, it's important to call Diags.getDiagnosticLevel with the location where you intend to emit the warning; in the presence of diagnostic pragmas it is possible that a small section in the source has the warning enabled while it is normally disabled.<br>

<br>
Chandler, if you can evaluate the new warning that'd be great.<br></blockquote><div><br></div><div>Only two warnings in LLVM+Clang. Fixed one in r130707 as it looked clearly wrong (although perhaps benign).</div><div>
<br></div><div>The other is in lib/Object, I'll chat about that on IRC to see if that code should be changed as well. </div></div><br>