diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-11-23 04:06:09 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-11-23 04:06:09 +0000 |
commit | 8a88a0b71520b418800ce1a4eb8bd4541b02d057 (patch) | |
tree | 927daada9a47ff15a9249b3569168ae76e2003e0 /lib/Parse/ParseCXXInlineMethods.cpp | |
parent | e6d601f912ea8fb367204f342f799196782195dd (diff) |
Generate a marker token when entering or leaving a submodule when building a
module. Use the marker to diagnose cases where we try to transition between
submodules when not at the top level (most likely because a closing brace was
missing at the end of a header file, but is also possible if submodule headers
attempt to do something fundamentally non-modular, like our .def files).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195543 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseCXXInlineMethods.cpp')
-rw-r--r-- | lib/Parse/ParseCXXInlineMethods.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Parse/ParseCXXInlineMethods.cpp b/lib/Parse/ParseCXXInlineMethods.cpp index 7792305165..9a69bec167 100644 --- a/lib/Parse/ParseCXXInlineMethods.cpp +++ b/lib/Parse/ParseCXXInlineMethods.cpp @@ -580,6 +580,9 @@ bool Parser::ConsumeAndStoreUntil(tok::TokenKind T1, tok::TokenKind T2, switch (Tok.getKind()) { case tok::eof: + case tok::annot_module_begin: + case tok::annot_module_end: + case tok::annot_module_include: // Ran out of tokens. return false; @@ -965,6 +968,9 @@ bool Parser::ConsumeAndStoreInitializer(CachedTokens &Toks, goto consume_token; case tok::eof: + case tok::annot_module_begin: + case tok::annot_module_end: + case tok::annot_module_include: // Ran out of tokens. return false; |