On Wed, Sep 11, 2013 at 4:12 PM, Aaron Ballman <[email protected]>wrote:
> > +void PrintPPOutputPPCallbacks::PragmaWarning(SourceLocation Loc,
> > + StringRef WarningSpec,
> > + ArrayRef<int> Ids) {
> > + startNewLineIfNeeded();
> > + MoveToLine(Loc);
> > + OS << "#pragma warning(" << WarningSpec << ':';
> > + for (int I = 0, E = Ids.size(); I != E; ++I)
> > + OS << ' ' << Ids[I];
>
> Use an iterator instead of indexes?
>
Meh.
> > + OS << ')';
> > + setEmittedDirectiveOnThisLine();
>
> This doesn't seem to support the syntax where there are multiple
> specifiers. Eg)
>
> #pragma warning(disable:1; once:2)
>
That's OK, it should produce semantically equivalent output, down to the
#line markers.
> Index: lib/Lex/Pragma.cpp
> > ===================================================================
> > + SmallString<64> IntegerBuffer;
>
> Seems a bit huge for the numbers we'd be lexing.
>
Yeah, copy pasto.
> In the error case, do we want to diagnose what's wrong?
>
No, there are different diagnostics.
> In all of the early returns, I think you'll want to skip until you get
> to the end of the pragma or else you'll get a cascade of errors.
>
With testing this doesn't appear necessary. Some higher level code must be
handling this. The other pragmas also don't do this.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits