1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 18:05:33 +02:00

Bug 318588: Add support for C++0x to DeclSpecWriter

https://bugs.eclipse.org/bugs/show_bug.cgi?id=318588
This commit is contained in:
Emanuel Graf 2010-07-01 12:25:02 +00:00
parent 2c6f81a72d
commit 81f191e4a4
2 changed files with 14 additions and 3 deletions

View file

@ -162,3 +162,11 @@ wchar_t wc;
//%CPP //%CPP
mutable int n; mutable int n;
//!C++0x auto keyword Bug 318588
//%CPP
auto var = 42;
//!C++0x long long keyword Bug 318588
//%CPP
long long int i;

View file

@ -121,6 +121,10 @@ public class DeclSpecWriter extends NodeWriter {
if (isCpp) if (isCpp)
return Keywords.CHAR32_T; return Keywords.CHAR32_T;
break; break;
case IASTSimpleDeclSpecifier.t_auto:
if (isCpp)
return Keywords.AUTO;
break;
} }
System.err.println("Unknow Specifiertype: " + type); //$NON-NLS-1$ System.err.println("Unknow Specifiertype: " + type); //$NON-NLS-1$
@ -383,12 +387,11 @@ public class DeclSpecWriter extends NodeWriter {
scribe.printStringSpace(SHORT); scribe.printStringSpace(SHORT);
}else if(simpDeclSpec.isLong()) { }else if(simpDeclSpec.isLong()) {
scribe.printStringSpace(LONG); scribe.printStringSpace(LONG);
}else if(simpDeclSpec.isLongLong()) {
scribe.print(LONG_LONG);
} }
if (simpDeclSpec instanceof ICASTSimpleDeclSpecifier) { if (simpDeclSpec instanceof ICASTSimpleDeclSpecifier) {
ICASTSimpleDeclSpecifier cSimpDeclSpec = (ICASTSimpleDeclSpecifier) simpDeclSpec; ICASTSimpleDeclSpecifier cSimpDeclSpec = (ICASTSimpleDeclSpecifier) simpDeclSpec;
if (cSimpDeclSpec.isLongLong()) {
scribe.print(LONG_LONG);
}
if (cSimpDeclSpec.isComplex()) { if (cSimpDeclSpec.isComplex()) {
scribe.print(_COMPLEX); scribe.print(_COMPLEX);
} }