<div dir="rtl"><div dir="ltr">I don't know how to restrict expansion but compiler tests are usually reduced to be independent of system headers, for the exact reason you stated. </div><div dir="ltr">C-reduce is highly useful for this task:</div><div dir="ltr"><br></div><div dir="ltr"> <a href="https://embed.cs.utah.edu/creduce/">https://embed.cs.utah.edu/creduce/</a><br></div><div dir="ltr"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2015-11-18 16:48 GMT+02:00 Martin J. O'Riordan via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-IE" link="#0563C1" vlink="#954F72"><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">I am wondering if there is some hidden option or mechanism in CLang that I can use to pre-process like ‘</span><span style="font-size:12.0pt;font-family:"Courier New"">-E</span><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">’ or ‘</span><span style="font-size:12.0pt;font-family:"Courier New"">-frewrite-includes</span><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">’, but which does not expand the headers from the system include directories?<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">There are often times when I would like this type of capability, so that I can create test-cases for reported bug, but have them remain valid with future revisions of the compiler and its supporting headers and libraries. It is not uncommon for a new version of a system header (ISO C, ISO C++, or our own extended headers) to have changes that are not 100% compatible with the results of the expanded result of an older version.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">The headers belonging to the programmer and their source need to be expanded, but I would like to retain the unexpanded system headers, and in particular not expand the macros defined in a system header, and leave the system headers as ‘</span><span style="font-size:12.0pt;font-family:"Courier New"">#include <<i>sysheadername</i>></span><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">’.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">Thanks,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"> MartinO - Movidius Ltd.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p></div></div><br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>