diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-06-19 19:58:34 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-06-19 19:58:34 +0000 |
commit | 8f9359f5ae1227f3b489d1d261225d8180b64ed3 (patch) | |
tree | 86cc556a9f00e70f337e6e47ae8aa799a74ef7ee /lib/Parse/ParseCXXInlineMethods.cpp | |
parent | 28d16d79e464063c09aa63c87afe10c25cb66c7c (diff) |
Cure for Doug's insomnia.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106394 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseCXXInlineMethods.cpp')
-rw-r--r-- | lib/Parse/ParseCXXInlineMethods.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Parse/ParseCXXInlineMethods.cpp b/lib/Parse/ParseCXXInlineMethods.cpp index e765a06087..bc95049ec5 100644 --- a/lib/Parse/ParseCXXInlineMethods.cpp +++ b/lib/Parse/ParseCXXInlineMethods.cpp @@ -151,7 +151,7 @@ void Parser::ParseLexedMethodDeclarations(ParsingClass &Class) { "ParseAssignmentExpression went over the default arg tokens!"); // There could be leftover tokens (e.g. because of an error). // Skip through until we reach the original token position. - while (Tok.getLocation() != origLoc) + while (Tok.getLocation() != origLoc && Tok.isNot(tok::eof)) ConsumeAnyToken(); delete Toks; @@ -218,7 +218,7 @@ void Parser::ParseLexedMethodDefs(ParsingClass &Class) { "ParseFunctionTryBlock went over the cached tokens!"); // There could be leftover tokens (e.g. because of an error). // Skip through until we reach the original token position. - while (Tok.getLocation() != origLoc) + while (Tok.getLocation() != origLoc && Tok.isNot(tok::eof)) ConsumeAnyToken(); continue; } @@ -243,7 +243,7 @@ void Parser::ParseLexedMethodDefs(ParsingClass &Class) { // expensive isBeforeInTranslationUnit call. if (PP.getSourceManager().isBeforeInTranslationUnit(Tok.getLocation(), origLoc)) - while (Tok.getLocation() != origLoc) + while (Tok.getLocation() != origLoc && Tok.isNot(tok::eof)) ConsumeAnyToken(); } |