[PATCH] D18011: [modules] Diagnose insufficient privileges when trying to load the modulemap

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 18 08:39:54 PDT 2016


rsmith added a comment.

I would prefer that we solve this problem generically for all files that Clang tries to open, not just for module map files. (Note, for instance, that PR20468 concerns files referenced by module map files, such as their nominated headers, not the module map files themselves.)


================
Comment at: lib/Frontend/FrontendActions.cpp:269
@@ -268,3 +268,3 @@
   const FileEntry *ModuleMap =
       CI.getFileManager().getFile(Filename, /*openFile*/true);
   if (!ModuleMap)  {
----------------
Why don't we fail up here when trying to open the file for read?


http://reviews.llvm.org/D18011





More information about the cfe-commits mailing list