[PATCH] D53334: [Frontend/Modules] Show diagnostics on prebuilt module configuration mismatch too

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 7 13:49:34 PST 2018

dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

While I'm not 100% sure about the actual fix - I'm confident enough that @rsmith can provide any further clarification in post-commit.

the test case can probably be simplified before commit - I'd suggest removing the "positive" case (the case without any diagnostics) as that's likely already covered in other tests that added this functionality to begin with, so I'd only have the case which produces the diagnostics - that should simplify/reduce the RUN lines, remove some of the #ifdefs, etc. (& potentially, you could roll the use and definition of the module into the same file as the RUN lines - so it's easier to eyeball all the relevant stuff in one place) & remove the function from the module - as this seems to produce a diagnostic even if the module is empty? Ultimately something like:

  RUN: compile -DMOD_DEF to %t/module_mismatch.pcm
  RUN: compile -DMOD_USE with prebuilt-module-path=%t
  #ifdef MOD_DEF
  export module module_mismatch
  #ifdef MOD_USE
  import module_mismatch

(also removing the extra "prebuilt_modules" directory name to reduce the length of command line arguments, etc)

  rC Clang


More information about the cfe-commits mailing list