Fix for PR2750; don't check for an 'e' in the trash after the token.
Note that this isn't really a complete fix; I think there are other potential overrun situations. I don't really know what the best systematic fix is, though. llvm-svn: 55622
This commit is contained in:
parent
7c9ba6a1e3
commit
ee29c9c2fc
|
@ -224,7 +224,7 @@ NumericLiteralParser(const char *begin, const char *end,
|
|||
saw_period = true;
|
||||
s = SkipDigits(s);
|
||||
}
|
||||
if (*s == 'e' || *s == 'E') { // exponent
|
||||
if (s != ThisTokEnd && (*s == 'e' || *s == 'E')) { // exponent
|
||||
const char *Exponent = s;
|
||||
s++;
|
||||
saw_exponent = true;
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/* RUN: clang -fsyntax-only -verify %s
|
||||
*/
|
||||
# define XRECORD(x, c_name) e##c (x, __LINE__)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void x() {
|
||||
|
||||
XRECORD (XRECORD (1, 1), 1);
|
||||
}
|
Loading…
Reference in New Issue