aboutsummaryrefslogtreecommitdiff
path: root/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
commitdd5b1018d97a9666da92d320485a727ac63ee89a (patch)
tree2012113c32fcface3a0bb4acca5bf018d57d9401 /lib/Format/UnwrappedLineParser.cpp
parentdac62528c1a66db867e21cfa7cfc439d557d6f0c (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171720 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/UnwrappedLineParser.cpp')
-rw-r--r--lib/Format/UnwrappedLineParser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp
index 70f33ad031..4066b55ecb 100644
--- a/lib/Format/UnwrappedLineParser.cpp
+++ b/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();