yamaguchi added inline comments.

================
Comment at: clang/lib/Lex/HeaderSearch.cpp:285
     // directory.
-    loadSubdirectoryModuleMaps(SearchDirs[Idx]);
+    if (ModMap.getLangOpts().ObjC1 || ModMap.getLangOpts().ObjC2)
+      loadSubdirectoryModuleMaps(SearchDirs[Idx]);
----------------
bruno wrote:
> aprantl wrote:
> > Are these flags also enabled in Objective-C++ mode?
> Looks like all this logic was introduced in r177621 to allow the names of 
> modules to differ from the name of their subdirectory in the include path.
> 
> Instead of having this to be based on the language, it's probably better if 
> we have it based on @import name lookup, which is the scenario where we 
> actually currently look more aggressively, did you try that path?
> 
> This is also lacking a testcase, can you create one?
> Are these flags also enabled in Objective-C++ mode?
I think so from FrontendOptions.h:190
`bool isObjectiveC() const { return Lang == ObjC || Lang == ObjCXX; }`

> it's probably better if we have it based on @import name lookup
I don't think I understood what you're saying, could you explain a bit more?

> This is also lacking a testcase, can you create one?
Sure!


https://reviews.llvm.org/D48367



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to