[PATCH] D34158: For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is available
James Y Knight via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 10 13:46:29 PDT 2017
jyknight added a comment.
In https://reviews.llvm.org/D34158#838454, @mibintc wrote:
> This patch is responding to @jyknight 's concern about preprocessed input. The patch as it stands doesn't have this issue. I added 2 test cases, one using option -x cpp-output, and another for a source file suffixed with .i
>
> Quoting James: "Firstly, let's consider a "clang foo.i" or "clang -x cpp-output foo.c" compilation. In that case, it *clearly* should not be including the predef file. I think the patch as it stands may not do this properly. A test needs to be added for this to this patch, and perhaps the behavior needs to be fixed as well."
Thanks for the test. It wasn't obvious from the code, so I'm glad to hear it was already correct. :)
Did you see the other suggestion I cleverly hid within a big block of commentary? "(TO FIX: We should be stripping the new arg as well: add "-fsystem-include-if-exists" argument to the list of include things in the skipArgs() function in lib/Driver/Job.cpp)"
https://reviews.llvm.org/D34158
More information about the cfe-commits
mailing list