1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-08 16:55:38 +02:00

Bug 324384: Content assist in invalid K&R parameter decl.

This commit is contained in:
Markus Schorn 2010-09-06 14:16:18 +00:00
parent 703afbd706
commit 77a4148807
2 changed files with 9 additions and 1 deletions

View file

@ -267,4 +267,12 @@ public class BasicCompletionTest extends CompletionTestBase {
String[] expected= {"tint"};
checkCompletion(code, false, expected);
}
// void f(x) int y(
public void testIncompleteKnrFunction_Bug324384b() throws Exception {
// Content assist won't work here, just verify that we don't run out of memory
String code = getAboveComment();
String[] expected= {};
checkCompletion(code, false, expected);
}
}

View file

@ -1935,7 +1935,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
IToken next=null;
while (LT(1) != IToken.tLBRACE) {
next = consume();
if (next == previous) { // infinite loop detected
if (next == previous || next.getType() == IToken.tEOC) { // infinite loop detected
break;
}
previous = next;