[PATCH] [modules] PR20507: Avoid silent textual inclusion.

Richard Smith richard at metafoo.co.uk
Fri Jun 12 15:46:13 PDT 2015


================
Comment at: lib/Lex/ModuleMap.cpp:346-347
@@ -345,4 +345,1 @@
-      // Cannot use a module if it is unavailable.
-      if (!H.getModule()->isAvailable())
-        continue;
       if (!Result || isBetterKnownHeader(H, Result))
----------------
Should we also teach `isBetterKnownHeader` to consider an available module to be better than an unavailable one? (If I have two modules covering a header file, and one of them requires "blah" and the other requires "!blah", we should presumably pick the available module.)

http://reviews.llvm.org/D10423

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list