On Apr 29, 2011, at 7:48 PM, Richard T wrote:

> Moved the logic for checking undefined behavior and its warnings into 
> CheckCompatibleReinterpretCast().  Also, cleaned up the test case a little.

Thanks! Submitted in r130703 with a tweak; I changed

+  if (Diags.getDiagnosticLevel(DiagID, SourceLocation()) ==
+          Diagnostic::Ignored) {

to

+  if (Diags.getDiagnosticLevel(DiagID, Range.getBegin()) ==
+          Diagnostic::Ignored) {

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.

Chandler, if you can evaluate the new warning that'd be great.

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to