1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-21 21:52:10 +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
asm("movl %1, %%eax;");
//!GNUExtendedASMDeclarationTest
//%CPP GNU
asm("bswap %0" : "+r" (_data));
//!FunctionDefinitionTest
//%CPP
int foo()

View file

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