1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 06:02:11 +02:00

fix omitted parentheses in extended ASM #134

This commit is contained in:
Neuromancer42 2022-11-07 00:31:30 +08:00 committed by Jonah Graham
parent b37e9c3812
commit 90c6b6c0e9
2 changed files with 10 additions and 9 deletions

View file

@ -2,6 +2,10 @@
//%CPP //%CPP
asm("movl %1, %%eax;"); asm("movl %1, %%eax;");
//!GNUExtendedASMDeclarationTest
//%CPP GNU
asm("bswap %0" : "+r" (_data));
//!FunctionDefinitionTest //!FunctionDefinitionTest
//%CPP //%CPP
int foo() int foo()

View file

@ -1927,17 +1927,14 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
break; break;
case IToken.tEOC: case IToken.tEOC:
throw new EndOfFileException(t.getOffset()); throw new EndOfFileException(t.getOffset());
}
default: if (open > 0 && content != null) {
if (content != null) {
if (needspace) { if (needspace) {
content.append(' '); content.append(' ');
} }
content.append(t.getCharImage()); content.append(t.getCharImage());
needspace = true; needspace = true;
} }
break;
}
} }
return t; return t;
} }