[cfe-commits] r106394 - /cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Sat Jun 19 12:58:34 PDT 2010
Author: akirtzidis
Date: Sat Jun 19 14:58:34 2010
New Revision: 106394
URL: http://llvm.org/viewvc/llvm-project?rev=106394&view=rev
Log:
Cure for Doug's insomnia.
Modified:
cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp
Modified: cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp?rev=106394&r1=106393&r2=106394&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp (original)
+++ cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp Sat Jun 19 14:58:34 2010
@@ -151,7 +151,7 @@
"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 @@
"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 @@
// expensive isBeforeInTranslationUnit call.
if (PP.getSourceManager().isBeforeInTranslationUnit(Tok.getLocation(),
origLoc))
- while (Tok.getLocation() != origLoc)
+ while (Tok.getLocation() != origLoc && Tok.isNot(tok::eof))
ConsumeAnyToken();
}
More information about the cfe-commits
mailing list