<div dir="ltr">On Wed, Sep 11, 2013 at 4:12 PM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> +void PrintPPOutputPPCallbacks::PragmaWarning(SourceLocation Loc,<br>
> +                                             StringRef WarningSpec,<br>
> +                                             ArrayRef<int> Ids) {<br>
> +  startNewLineIfNeeded();<br>
> +  MoveToLine(Loc);<br>
> +  OS << "#pragma warning(" << WarningSpec << ':';<br>
> +  for (int I = 0, E = Ids.size(); I != E; ++I)<br>
> +    OS << ' ' << Ids[I];<br>
<br>
Use an iterator instead of indexes?<br></blockquote><div><br></div><div>Meh.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> +  OS << ')';<br>
> +  setEmittedDirectiveOnThisLine();<br>
<br>
This doesn't seem to support the syntax where there are multiple<br>
specifiers.  Eg)<br>
<br>
#pragma warning(disable:1; once:2)<br></blockquote><div><br></div><div>That's OK, it should produce semantically equivalent output, down to the #line markers.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

> Index: lib/Lex/Pragma.cpp<br>
> ===================================================================<br>> +  SmallString<64> IntegerBuffer;<br>
<br>
Seems a bit huge for the numbers we'd be lexing.<br></blockquote><div><br></div><div>Yeah, copy pasto.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

In the error case, do we want to diagnose what's wrong?<br></blockquote><div><br></div><div>No, there are different diagnostics.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In all of the early returns, I think you'll want to skip until you get<br>
to the end of the pragma or else you'll get a cascade of errors.<br></blockquote><div><br></div><div>With testing this doesn't appear necessary.  Some higher level code must be handling this.  The other pragmas also don't do this.</div>
<div> </div></div></div></div>