diff options
author | Craig Griffiths <craig.griffiths@codethink.co.uk> | 2015-08-21 16:53:21 +0100 |
---|---|---|
committer | Craig Griffiths <craig.griffiths@codethink.co.uk> | 2015-08-21 16:53:21 +0100 |
commit | 3d5977ed2d56036f5156ac277d209a9b2455ca3d (patch) | |
tree | b7c9f49096b79af4710e69f5460714ce1bc28034 | |
parent | d72c4e0475ec1c8d6ad352bcd478501df42d59f9 (diff) | |
download | flang-craiggriffiths/semi-colon_seg-fault_fix.tar.gz |
Consume the semi-colon token when matched before making a recursive call to LexTokenInternal(). This fixes a segmentation fault.craiggriffiths/semi-colon_seg-fault_fix
-rw-r--r-- | lib/Parse/Lexer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Parse/Lexer.cpp b/lib/Parse/Lexer.cpp index f7fa3d9896..201ef0a39a 100644 --- a/lib/Parse/Lexer.cpp +++ b/lib/Parse/Lexer.cpp @@ -1463,6 +1463,7 @@ LexIdentifier: break; case ';': LastTokenWasSemicolon = true; + getNextChar(); // Consume ';' token to prevent recursive matching return LexTokenInternal(Result, IsPeekAhead); case '%': Kind = tok::percent; |