diff options
author | Sergey Prigogin | 2012-06-05 17:32:51 +0000 |
---|---|---|
committer | Sergey Prigogin | 2012-06-10 05:05:39 +0000 |
commit | 2bc64f56f3f76a72e3ee3f8df63fa621d01147db (patch) | |
tree | 5f2df0c8f6483e700fa5d47e18c2d2cf18180d1a /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java | |
parent | 077c4ed4a130293319b9a4eb6af79a391a5abb27 (diff) | |
download | org.eclipse.cdt-2bc64f56f3f76a72e3ee3f8df63fa621d01147db.tar.gz org.eclipse.cdt-2bc64f56f3f76a72e3ee3f8df63fa621d01147db.tar.xz org.eclipse.cdt-2bc64f56f3f76a72e3ee3f8df63fa621d01147db.zip |
Bug 380498. Fixed few more cases where typedefs were not preserved.
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java')
-rw-r--r-- | core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java index 169c315b3f7..ccbff2cd8ca 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java @@ -253,14 +253,19 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt @Override public ICPPFunctionType getType() { if (type == null) { - final IType t = getNestedType(CPPVisitor.createType((definition != null) ? definition : declarations[0]), TDEF); + IType t = CPPVisitor.createType((definition != null) ? definition : declarations[0]); if (t instanceof ICPPFunctionType) { type = (ICPPFunctionType) t; - } else if (t instanceof ISemanticProblem){ - type= new ProblemFunctionType(((ISemanticProblem) t).getID()); } else { - // This case is unexpected - type = new ProblemFunctionType(ISemanticProblem.TYPE_UNRESOLVED_NAME); + t = getNestedType(t, TDEF); + if (t instanceof ICPPFunctionType) { + type = (ICPPFunctionType) t; + } else if (t instanceof ISemanticProblem){ + type= new ProblemFunctionType(((ISemanticProblem) t).getID()); + } else { + // This case is unexpected + type = new ProblemFunctionType(ISemanticProblem.TYPE_UNRESOLVED_NAME); + } } } return type; |