mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-05 07:15:39 +02:00
Bug 477359 - Completion node inside attribute specifier
Change-Id: I54902dc41834943a3fcfcca60ebbc2944fa0a68a Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
This commit is contained in:
parent
f5707a4d62
commit
28c22cca09
2 changed files with 11 additions and 0 deletions
|
@ -2467,6 +2467,11 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
|
||||||
IToken t;
|
IToken t;
|
||||||
while ((t = LA(1)).getType() != endType) {
|
while ((t = LA(1)).getType() != endType) {
|
||||||
t = consume();
|
t = consume();
|
||||||
|
|
||||||
|
if (t.getType() == IToken.tCOMPLETION || t.getType() == IToken.tEOC) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
result.addToken(createASTToken(t));
|
result.addToken(createASTToken(t));
|
||||||
|
|
||||||
IASTToken token;
|
IASTToken token;
|
||||||
|
|
|
@ -1722,4 +1722,10 @@ public class CompletionTests extends AbstractContentAssistTest {
|
||||||
final String[] expected = { "A", "C", "foo(void)" };
|
final String[] expected = { "A", "C", "foo(void)" };
|
||||||
assertCompletionResults(fCursorOffset, expected, ID);
|
assertCompletionResults(fCursorOffset, expected, ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// int [[f(./*cursor*/)]] i;
|
||||||
|
public void testCompletionInsideAttribute_bug477359() throws Exception {
|
||||||
|
final String[] expected = {};
|
||||||
|
assertCompletionResults(fCursorOffset, expected, ID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue