Fix the root cause of PR2750 instead of the side effect.
NumericLiteral parser is not careful about overrun because
it should never be possible. It implicitly expects that its
input matched the regex for pp-constant. Because of this, it
knows it can't be pointing to a prefix of something that
looks like a number. This is all fine, except that __LINE__
does not prevent implicit concatenation from happening. Fix
__LINE__ to not do this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56818 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Lex/LiteralSupport.cpp b/lib/Lex/LiteralSupport.cpp
index 8c2f2af..a66aaa2 100644
--- a/lib/Lex/LiteralSupport.cpp
+++ b/lib/Lex/LiteralSupport.cpp
@@ -224,7 +224,7 @@
saw_period = true;
s = SkipDigits(s);
}
- if (s != ThisTokEnd && (*s == 'e' || *s == 'E')) { // exponent
+ if ((*s == 'e' || *s == 'E')) { // exponent
const char *Exponent = s;
s++;
saw_exponent = true;