Enable layering check in unavailable modules.
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197805 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Lex/ModuleMap.h 21 additions, 5 deletionsinclude/clang/Lex/ModuleMap.h
- include/clang/Lex/Preprocessor.h 0 additions, 19 deletionsinclude/clang/Lex/Preprocessor.h
- lib/Lex/ModuleMap.cpp 104 additions, 15 deletionslib/Lex/ModuleMap.cpp
- lib/Lex/PPDirectives.cpp 2 additions, 68 deletionslib/Lex/PPDirectives.cpp
- test/Modules/Inputs/declare-use/module.map 2 additions, 0 deletionstest/Modules/Inputs/declare-use/module.map
Loading
Please register or sign in to comment