Inline Asm Warnings in Clang

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. 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?



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