[cfe-dev] Inline Asm Warnings in Clang

Reid Kleckner rnk at google.com
Wed Jul 1 10:49:10 PDT 2015


Quentin, is there a strategy for threading warning ids through the
diagnostic reporting mechanism of the llvmcontext, or is that impractical?

On Mon, Jun 15, 2015 at 6:34 AM, Renato Golin <renato.golin at linaro.org>
wrote:

> Ping
>
> On 31 May 2015 at 20:05, Renato Golin <renato.golin at linaro.org> wrote:
> > Clang folks,
> >
> > I had a read around the reporting code in Clang and I have to say I'm
> > a bit lost...
> >
> > In ARMAsmParser, we have warnings:
> >
> >     if (ARMMCRegisterClasses[ARM::GPRRegClassID].contains(Reg))
> >         Warning(RegLoc, "register list not in ascending order");
> >
> > When using inline asm, clang has the -Wno-inline-asm, which disables
> > those warnings. But when compiling assmebly files directly, that -W
> > directive doesn't work (intentionally).
> >
> > I'd like to create a new -W flag, -Wasm-directives or something, which
> > will warn on architecture changing directives misuse.
> >
> > DiagnosticsSemaKinds.td seems to have a large list of inline asm
> > warnings, but I need to use the Diag.Warn(..., ID) so that it can
> > suppress if the ID is disabled. Meanwhile, inside the ARMAsmParser,
> > the Warning function doesn't have an ID to suppress. So, even if I
> > create such a warning flag in Clang, how do I make it work inside the
> > assembly parser?
> >
> > cheers,
> > --renato
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150701/90ee2e09/attachment.html>


More information about the cfe-dev mailing list