<div dir="ltr">Makes perfect sense, and patch LGTM. Thanks!</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 4, 2014 at 3:16 AM, Lubos Lunak <span dir="ltr"><<a href="mailto:l.lunak@centrum.cz" target="_blank">l.lunak@centrum.cz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
 Option -frewrite-includes comments out #include directives it replaces by<br>
enclosing it in #if 0, which moves the included contents, changing their<br>
perceived line numbers e.g. in the "In file included from" messages in a<br>
follow-up compilation:<br>
<br>
$ cat b.cpp<br>
#include "b.h"<br>
$ cat b.h<br>
void f()<br>
    {<br>
    int unused_variable;<br>
    }<br>
$ clang++ -E -frewrite-includes b.cpp | clang++ -Wall -x c++ -c -<br>
In file included from b.cpp:4:<br>
./b.h:3:9: warning: unused variable 'unused_variable' [-Wunused-variable]<br>
    int unused_variable;<br>
        ^<br>
1 warning generated.<br>
$ clang++ -Wall -c b.cpp<br>
In file included from b.cpp:1:<br>
./b.h:3:9: warning: unused variable 'unused_variable' [-Wunused-variable]<br>
    int unused_variable;<br>
        ^<br>
1 warning generated.<br>
<br>
 The attached patch fixes this.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
 Lubos Lunak<br>
</font></span><br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>