]> granicus.if.org Git - clang/commit
When we hit a #include directive that maps to a module import, emit a token
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 15 Nov 2013 04:24:58 +0000 (04:24 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 15 Nov 2013 04:24:58 +0000 (04:24 +0000)
commit26297f57634994b4ae47a0774c372d6944265bb2
treefe29b29bbc7658920aae2265f3aae688e271b95e
parentf93ec7608aa79f9aac09304bfd3bc1918caf128f
When we hit a #include directive that maps to a module import, emit a token
representing the module import rather than making the module immediately
visible. This serves two goals:
 * It avoids making declarations in the module visible prematurely, if we
   walk past the #include during a tentative parse, for instance, and
 * It gives a diagnostic (although, admittedly, not a very nice one) if
   a header with a corresponding module is included anywhere other than
   at the top level.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194782 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/TokenKinds.def
include/clang/Sema/Sema.h
lib/Frontend/PrintPreprocessedOutput.cpp
lib/Lex/PPDirectives.cpp
lib/Parse/Parser.cpp
lib/Sema/SemaDecl.cpp
test/Modules/auto-module-import.m