[cfe-dev] [Modules] Silent textual inclusion when files not found.
Sean Silva
chisophugis at gmail.com
Tue Jun 2 19:57:32 PDT 2015
Hi all,
Currently we do not seem to issue any form of diagnostic when there are
missing headers named in a module map. See the attached test case. Even
worse, we will just treat all headers in the module as textual. Hilarity
ensues.
Some prior art in this area:
Daniel - r197485
Ben - r206664
Based on these commits, it ostensibly seems that clang does *some* sort of
checking for missing files in a module map, but I can't seem to coax clang
into doing this in C++ language mode.
Looking at the source code, it seems like we end up conflating
"unavailable" due to a failed `requires` with "a header is missing". It
sounds like we essentially need two notions "unsatisfied `requires`" and
"necessary header is missing" (a header guarded by an unsatisfied
`requires` does not count as "necessary"). Haven't dug in deep yet, but my
hypothesis is that somewhere along the way we silently treat a module with
missing headers as though it had an unsatisfied `requires`, leading to us
silently neglecting that it was ever in a module at all.
I'm glad to put some effort into fixing this; I spent a good part of today
with a bizarre error that I traced back to this and I don't want my users
to have to deal with the same. Any pointers would be appreciated.
-- Sean Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150602/e38247f2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testmoduledepbuildfail.tar
Type: application/x-tar
Size: 5632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150602/e38247f2/attachment.tar>
More information about the cfe-dev
mailing list