1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 321972 - DeclarationGenerator discards basic type qualifiers ( Tomasz Wesolowski)

This commit is contained in:
Alena Laskavaia 2010-08-11 02:30:49 +00:00
parent 2828f69a77
commit 78fdb615a6

View file

@ -100,9 +100,16 @@ public class DeclarationGeneratorImpl extends DeclarationGenerator {
returnedDeclSpec.setVolatile(true);
}
} else if (type instanceof IBasicType) {
Kind kind = ((IBasicType) type).getKind();
IBasicType basicType = (IBasicType) type;
IASTSimpleDeclSpecifier declSpec = factory.newSimpleDeclSpecifier();
declSpec.setType(kind);
declSpec.setType(basicType.getKind());
declSpec.setComplex(basicType.isComplex());
declSpec.setImaginary(basicType.isImaginary());
declSpec.setShort(basicType.isShort());
declSpec.setLong(basicType.isLong());
declSpec.setLongLong(basicType.isLongLong());
declSpec.setSigned(basicType.isSigned());
declSpec.setUnsigned(basicType.isUnsigned());
returnedDeclSpec = declSpec;
} else if (type instanceof IBinding) { /* ITypedef, ICompositeType... */
// BTW - we need to distinguish (and fail explicitly) on literal composites like: