Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Ridge2014-08-09 08:38:34 +0000
committerSergey Prigogin2014-08-11 17:30:57 +0000
commit42235704cb6742c32119f12580bb486107140282 (patch)
tree4e2b6c2c2480d80064d48b6f7f47a5d1988c32a0 /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBaseClause.java
parentb7ec8deec417e0338a13f0f3bde024a2d84f07c3 (diff)
downloadorg.eclipse.cdt-42235704cb6742c32119f12580bb486107140282.tar.gz
org.eclipse.cdt-42235704cb6742c32119f12580bb486107140282.tar.xz
org.eclipse.cdt-42235704cb6742c32119f12580bb486107140282.zip
Bug 438348 - Allow decltype-specifiers in base-specifiers
Change-Id: Ib027b78aa207e1fe0e1aef56fae7eeace041118c Signed-off-by: Nathan Ridge <zeratul976@hotmail.com> Reviewed-on: https://git.eclipse.org/r/31341 Tested-by: Hudson CI Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com> Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBaseClause.java')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBaseClause.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBaseClause.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBaseClause.java
index 15eb50c2ef9..a4a8766e86d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBaseClause.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBaseClause.java
@@ -25,6 +25,7 @@ import org.eclipse.cdt.core.dom.ast.ISemanticProblem;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNameSpecifier;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
@@ -49,16 +50,17 @@ public class CPPBaseClause implements ICPPBase, ICPPInternalBase {
@Override
public IType getBaseClassType() {
if (baseClass == null) {
- IBinding b = base.getName().resolveBinding();
+ ICPPASTNameSpecifier nameSpec = base.getNameSpecifier();
+ IBinding b = nameSpec.resolveBinding();
if (b instanceof IProblemBinding) {
- baseClass = new CPPClassType.CPPClassTypeProblem(base.getName(), ((IProblemBinding) b).getID());
+ baseClass = new CPPClassType.CPPClassTypeProblem(nameSpec, ((IProblemBinding) b).getID());
} else if (!(b instanceof IType)) {
- baseClass = new CPPClassType.CPPClassTypeProblem(base.getName(), ISemanticProblem.BINDING_NO_CLASS);
+ baseClass = new CPPClassType.CPPClassTypeProblem(nameSpec, ISemanticProblem.BINDING_NO_CLASS);
} else {
baseClass= (IType) b;
IType check= getNestedType(baseClass, TDEF);
if (!(check instanceof ICPPClassType || check instanceof ICPPUnknownType)) {
- baseClass = new CPPClassType.CPPClassTypeProblem(base.getName(), ISemanticProblem.BINDING_NO_CLASS);
+ baseClass = new CPPClassType.CPPClassTypeProblem(nameSpec, ISemanticProblem.BINDING_NO_CLASS);
}
}
}

Back to the top