[cfe-dev] libclang crash when parsing MS-style inline assembly
Reid Kleckner
rnk at google.com
Fri Nov 8 11:52:31 PST 2013
On Fri, Nov 8, 2013 at 1:12 AM, Kim Gräsman <kim.grasman at gmail.com> wrote:
> Hi Alp,
>
> On Fri, Nov 8, 2013 at 8:01 AM, Alp Toker <alp at nuanti.com> wrote:
> >
> > Now that we've dealt with the underlying crash, we can start to look at
> > how to handle this cleanly.
> >
> > I'd like to understand your requirements first..
> >
> > For your use cases, would it be acceptable to skip over the MS inline
> > assembly without parsing it, ie. having a special mode that turns this
> > into a soft error in parse-only tools?
>
> For me, I think so.
>
> We ran into this in IWYU [1], and I don't think inline assembly would
> introduce a "use" of any significance...
>
Muahahaha:
// foo.h
struct Foo {
static const int x = 20;
};
// foo.cc
int main() {
int r;
__asm {
mov ecx, Foo::x
mov r, ecx
};
return r;
}
Seems like a use that is relevant to IWYU. :)
> I'm not sure what you mean by "soft error", but I think I'd just
> ignore it completely rather than spewing diagnostics for things we
> can't affect and don't really care about.
>
> We don't use libclang, the problem is a little different there, as
> they can't initialize the respective targets. Our current workaround
> solves the problem for us.
>
> Thanks!
>
> - Kim
>
> [1] https://code.google.com/p/include-what-you-use/
> _______________________________________________
> 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/20131108/e1c71eeb/attachment.html>
More information about the cfe-dev
mailing list