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

Bug 353281: Follow up.

This commit is contained in:
Markus Schorn 2011-08-17 13:46:51 +02:00
parent ffca7f9d6b
commit ea5c5cf0d9
3 changed files with 5 additions and 7 deletions

View file

@ -20,7 +20,6 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.ICompositeType;
import org.eclipse.cdt.core.dom.ast.IMacroBinding;
import org.eclipse.cdt.core.dom.ast.IScope;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.parser.ParserLanguage;
import org.eclipse.cdt.core.parser.util.ArrayUtil;
import org.eclipse.cdt.internal.core.dom.Linkage;
@ -111,7 +110,7 @@ public class CASTTranslationUnit extends ASTTranslationUnit implements IASTAmbig
/**
* Maps structs from the index into this AST.
*/
public IType mapToASTType(ICompositeType type) {
public ICompositeType mapToASTType(ICompositeType type) {
return fStructMapper.mapToAST(type);
}
}

View file

@ -19,7 +19,6 @@ import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.ICompositeType;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.parser.util.CharArrayMap;
/**
@ -56,7 +55,7 @@ public class CStructMapper {
fTranslationUnit= tu;
}
public IType mapToAST(ICompositeType type) {
public ICompositeType mapToAST(ICompositeType type) {
if (fStructs == null) {
fStructs= new CharArrayMap<IASTName>();
fTranslationUnit.accept(new Visitor());

View file

@ -607,9 +607,9 @@ public class CVisitor extends ASTQueries {
}
if (type != null && type instanceof ICompositeType) {
final ICompositeType ct = (ICompositeType) type;
if (type instanceof IIndexBinding) {
type= ((CASTTranslationUnit) fieldReference.getTranslationUnit()).mapToASTType(ct);
ICompositeType ct = (ICompositeType) type;
if (ct instanceof IIndexBinding) {
ct= ((CASTTranslationUnit) fieldReference.getTranslationUnit()).mapToASTType(ct);
}
if (prefix) {
char[] p = fieldReference.getFieldName().toCharArray();