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 | 34f30516aa7f32cbff61dc9066f0b332dfd88c2b (patch) | |
tree | 3761579a8a9c29f366a7f5a6c805567dfecef066 /clang/lib/Parse/ParseCXXInlineMethods.cpp | |
parent | 5c6eab21ebaf93c68b5d1df8b845518ea6f54b63 (diff) | |
download | bcm5719-llvm-34f30516aa7f32cbff61dc9066f0b332dfd88c2b.tar.gz bcm5719-llvm-34f30516aa7f32cbff61dc9066f0b332dfd88c2b.zip |
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).
llvm-svn: 195543
Diffstat (limited to 'clang/lib/Parse/ParseCXXInlineMethods.cpp')
-rw-r--r-- | clang/lib/Parse/ParseCXXInlineMethods.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseCXXInlineMethods.cpp b/clang/lib/Parse/ParseCXXInlineMethods.cpp index 77923051653..9a69bec1679 100644 --- a/clang/lib/Parse/ParseCXXInlineMethods.cpp +++ b/clang/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; |