mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-21 21:52:10 +02:00
Bug 540991 - Handle ICPPASTTypeTransformationSpecifier in CModelBuilder2
Change-Id: Ie87c89388d052cdaffb80163af666c3910da3b4a
This commit is contained in:
parent
86b8f21623
commit
d085e955c7
2 changed files with 17 additions and 0 deletions
|
@ -79,6 +79,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateParameter;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplatedTypeTemplateParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTypeId;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTypeIdExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTypeTransformationSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUnaryExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.gnu.IGNUASTCompoundStatementExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.gnu.c.ICASTKnRFunctionDeclarator;
|
||||
|
@ -698,6 +699,17 @@ public class ASTStringUtil {
|
|||
} else if (declSpecifier instanceof IASTNamedTypeSpecifier) {
|
||||
final IASTNamedTypeSpecifier namedTypeSpec = (IASTNamedTypeSpecifier) declSpecifier;
|
||||
appendQualifiedNameString(buffer, namedTypeSpec.getName());
|
||||
} else if (declSpecifier instanceof ICPPASTTypeTransformationSpecifier) {
|
||||
final ICPPASTTypeTransformationSpecifier typeTransformationSpec = (ICPPASTTypeTransformationSpecifier) declSpecifier;
|
||||
switch (typeTransformationSpec.getOperator()) {
|
||||
case underlying_type:
|
||||
buffer.append(GCCKeywords.cp__underlying_type);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
buffer.append('(');
|
||||
appendTypeIdString(buffer, typeTransformationSpec.getOperand());
|
||||
buffer.append(')');
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTStaticAssertDeclaration;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateId;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateSpecialization;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTypeTransformationSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDirective;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
|
||||
|
@ -491,6 +492,10 @@ public class CModelBuilder2 implements IContributedModelBuilder {
|
|||
if (declarator != null) {
|
||||
return createTypedefOrFunctionOrVariable(parent, declSpecifier, declarator, isTemplate);
|
||||
}
|
||||
} else if (declSpecifier instanceof ICPPASTTypeTransformationSpecifier) {
|
||||
if (declarator != null) {
|
||||
return createTypedefOrFunctionOrVariable(parent, declSpecifier, declarator, isTemplate);
|
||||
}
|
||||
} else {
|
||||
assert false : "TODO: " + declSpecifier.getClass().getName(); //$NON-NLS-1$
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue