[PATCH] D103930: [clang][HeaderSearch] Fix implicit module when using header maps

Andrew Gallagher via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 17 12:28:35 PDT 2021


andrewjcg added inline comments.


================
Comment at: clang/test/Modules/implicit-module-header-maps.cpp:27
+#define FOO
+// This include will fail if modules weren't used.  The include name itself
+// doesn't exist and relies on the header map to remap it to the real header.
----------------
andrewjcg wrote:
> dexonsmith wrote:
> > Do you really mean if modules aren't used, or do you mean if header maps aren't used?
> > 
> > (I think we want to find the same headers on disk whether or not modules are on... if this patch changes that, then I guess I'm not totally understanding why...)
> Ahh, meant if header maps aren't used.  Will fix.
Ah no wait.  The include should fail if either header maps or modules isn't used (header maps required for the remapping and modules required to prevent the `FOO` define from propagating into the included header and triggering the `#error`).  

Will update the comment.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103930/new/

https://reviews.llvm.org/D103930



More information about the cfe-commits mailing list