summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/UnwrappedLineParser.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2013-01-07 10:03:37 +0000
committerManuel Klimek <klimek@google.com>2013-01-07 10:03:37 +0000
commit7872571fc530bc0cc94f04eb914dcf263fdd65db (patch)
treeda0c74e0af711edb53d1586305c06f135dd0bbd3 /clang/lib/Format/UnwrappedLineParser.cpp
parent04ece8623ed5b9031dda1b4e2433f7f074830a19 (diff)
downloadbcm5719-llvm-7872571fc530bc0cc94f04eb914dcf263fdd65db.tar.gz
bcm5719-llvm-7872571fc530bc0cc94f04eb914dcf263fdd65db.zip
Fix incorrect FIXME.
The case that we wanted to write a test for cannot happen, as the UnwrappedLineParser already protects against it. Added an assert to prevent regressions of that assumption. llvm-svn: 171720
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.cpp')
-rw-r--r--clang/lib/Format/UnwrappedLineParser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp
index 70f33ad0315..4066b55ecb7 100644
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/lib/Format/UnwrappedLineParser.cpp
@@ -41,8 +41,9 @@ public:
}
virtual FormatToken getNextToken() {
- // FIXME: Write test that breaks due to a missing
- // if (eof()) return createEOF();
+ // The \c UnwrappedLineParser guards against this by never calling
+ // \c getNextToken() after it has encountered the first eof token.
+ assert(!eof());
Token = PreviousTokenSource->getNextToken();
if (eof())
return createEOF();
OpenPOWER on IntegriCloud