1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-11 18:25:40 +02:00

Bug 472950 - Fixed an infinite loop in content assist inside a body of a

lambda.

Change-Id: I5194571ba8a88e67e9cc897be463c5e833700000
This commit is contained in:
Sergey Prigogin 2015-10-28 18:01:03 -07:00
parent 904d0df63d
commit 3098d1679b

View file

@ -2674,6 +2674,9 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
while (true) { while (true) {
final int lt1= LT(1); final int lt1= LT(1);
if (lt1 == IToken.tEOC)
throwBacktrack(LA(1));
// Ignore passages inside braces (such as for a statement-expression), // Ignore passages inside braces (such as for a statement-expression),
// as they can basically contain tokens of any kind. // as they can basically contain tokens of any kind.
if (lt1 == IToken.tLBRACE) { if (lt1 == IToken.tLBRACE) {
@ -2686,7 +2689,7 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
continue; continue;
} }
if (lt1 == IToken.tEOC || lt1 == terminator) if (lt1 == terminator)
throwBacktrack(LA(1)); throwBacktrack(LA(1));
consume(); consume();