[PATCH] Enable layering check in unavailable modules

Daniel Jasper djasper at google.com
Thu Dec 19 07:01:52 PST 2013


Hi rsmith,

If a header file belonging to a certain module is not found on the filesystem, that header gets marked as unavailable. Now, the layering warning (-fmodules-decluse) should still warn about headers of this module being wrongfully included. Currently, headers belonging to those modules are just treated as not belonging to modules at all which means they can be included freely from everywhere.

To implement this (somewhat) cleanly, I have moved most of the layering checks into the ModuleMap. This will also help with showing FixIts later.

http://llvm-reviews.chandlerc.com/D2442

Files:
  include/clang/Lex/ModuleMap.h
  include/clang/Lex/Preprocessor.h
  lib/Lex/ModuleMap.cpp
  lib/Lex/PPDirectives.cpp
  test/Modules/Inputs/declare-use/module.map
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2442.1.patch
Type: text/x-patch
Size: 13018 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131219/dc8c43d1/attachment.bin>


More information about the cfe-commits mailing list