<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Nov 8, 2013 at 1:12 AM, Kim Gräsman <span dir="ltr"><<a href="mailto:kim.grasman@gmail.com" target="_blank">kim.grasman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Alp,<br>
<div class="im"><br>
On Fri, Nov 8, 2013 at 8:01 AM, Alp Toker <<a href="mailto:alp@nuanti.com">alp@nuanti.com</a>> wrote:<br>
><br>
> Now that we've dealt with the underlying crash, we can start to look at<br>
> how to handle this cleanly.<br>
><br>
> I'd like to understand your requirements first..<br>
><br>
> For your use cases, would it be acceptable to skip over the MS inline<br>
> assembly without parsing it, ie. having a special mode that turns this<br>
> into a soft error in parse-only tools?<br>
<br>
</div>For me, I think so.<br>
<br>
We ran into this in IWYU [1], and I don't think inline assembly would<br>
introduce a "use" of any significance...<br></blockquote><div><br></div><div>Muahahaha:</div><div><br></div><div><div>// foo.h</div><div>struct Foo {</div><div>  static const int x = 20;</div><div>};</div><div>
// foo.cc</div><div>int main() {</div><div>  int r;</div><div>  __asm {</div><div>    mov ecx, Foo::x</div><div>    mov r, ecx</div><div>  };</div><div>  return r;</div><div>}</div></div><div><br></div><div>Seems like a use that is relevant to IWYU.  :)</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I'm not sure what you mean by "soft error", but I think I'd just<br>
ignore it completely rather than spewing diagnostics for things we<br>
can't affect and don't really care about.<br>
<br>
We don't use libclang, the problem is a little different there, as<br>
they can't initialize the respective targets. Our current workaround<br>
solves the problem for us.<br>
<br>
Thanks!<br>
<br>
- Kim<br>
<br>
[1] <a href="https://code.google.com/p/include-what-you-use/" target="_blank">https://code.google.com/p/include-what-you-use/</a><br>
<div class=""><div class="h5">_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div></div>