diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-01-12 09:16:57 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-01-12 09:16:57 +0000 |
commit | 83de336b71c27b660332a1e11e5d390ef4d650cc (patch) | |
tree | 855866d5c58eb2f57e90f075d198887f944e7ae9 /clang/lib/Parse/ParseCXXInlineMethods.cpp | |
parent | 600ee4ad661225b401882076a340aa84aeed6a41 (diff) | |
download | bcm5719-llvm-83de336b71c27b660332a1e11e5d390ef4d650cc.tar.gz bcm5719-llvm-83de336b71c27b660332a1e11e5d390ef4d650cc.zip |
Parse: Get rid of cxx_exceptspec_end, use EOF instead
Similar to r225619, use a special EOF token to mark the end of the
exception specification instead of cxx_exceptspec_end. Use the current
scope as the marker.
llvm-svn: 225622
Diffstat (limited to 'clang/lib/Parse/ParseCXXInlineMethods.cpp')
-rw-r--r-- | clang/lib/Parse/ParseCXXInlineMethods.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseCXXInlineMethods.cpp b/clang/lib/Parse/ParseCXXInlineMethods.cpp index 0d5bb2e97d4..03784b4f5ea 100644 --- a/clang/lib/Parse/ParseCXXInlineMethods.cpp +++ b/clang/lib/Parse/ParseCXXInlineMethods.cpp @@ -418,7 +418,7 @@ void Parser::ParseLexedMethodDeclaration(LateParsedMethodDeclaration &LM) { ExceptionSpecTokens); // Clean up the remaining tokens. - if (Tok.is(tok::cxx_exceptspec_end)) + if (Tok.is(tok::eof) && Tok.getEofData() == Actions.CurScope) ConsumeToken(); else if (EST != EST_None) Diag(Tok.getLocation(), diag::err_except_spec_unparsed); @@ -437,8 +437,11 @@ void Parser::ParseLexedMethodDeclaration(LateParsedMethodDeclaration &LM) { // There could be leftover tokens (e.g. because of an error). // Skip through until we reach the original token position. - while (Tok.getLocation() != origLoc && Tok.isNot(tok::eof)) + while (Tok.getLocation() != origLoc) { + if (Tok.is(tok::eof) && Tok.getEofData() != Actions.CurScope) + break; ConsumeAnyToken(); + } delete Toks; LM.ExceptionSpecTokens = nullptr; |