Handle MS-style inline assembly in clang-modernize

Kim Gräsman kim.grasman at gmail.com
Mon Nov 24 20:43:52 PST 2014


On Mon, Nov 24, 2014 at 11:41 PM, Reid Kleckner <rnk at google.com> wrote:
>
> Your proposed fix only works for clang-modernize, but not clang-tidy or
> libclang clients. I'm saying it'd be nice if we could make it easy for tools
> to recover from this error instead of trying to fix it by pulling in the
> whole LLVM x86 backend. None of these tools should attempt to refactor
> system headers, for example, so ignoring functions with __asm blocks is
> probably good enough.

Topical: http://clang-developers.42468.n3.nabble.com/libclang-crash-when-parsing-MS-style-inline-assembly-td4035432.html#a4035754

I never got around to checking if LLVMInitialize* do fail silently in
the absence of X86 target support, so I can't tell what happens there.
Actual asm parsing seems to be short-circuited if target info is not
available.

- Kim



More information about the cfe-commits mailing list