diff options
author | Sergey Prigogin | 2012-08-09 18:13:59 +0000 |
---|---|---|
committer | Sergey Prigogin | 2012-08-14 22:46:09 +0000 |
commit | 27dfb6801e0f4bdde0af7950d69fd5ab402fd437 (patch) | |
tree | c849733f363cfac46253ce1e3c18c47ab053fba1 | |
parent | e9b0ab84dbc179f6e3d0a0b26a02139da99a8c52 (diff) | |
download | org.eclipse.cdt-27dfb6801e0f4bdde0af7950d69fd5ab402fd437.tar.gz org.eclipse.cdt-27dfb6801e0f4bdde0af7950d69fd5ab402fd437.tar.xz org.eclipse.cdt-27dfb6801e0f4bdde0af7950d69fd5ab402fd437.zip |
Bug 299911. Improved propagation of template instantiation context.
-rw-r--r-- | core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ClassTypeHelper.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ClassTypeHelper.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ClassTypeHelper.java index 2debf208a5c..44689aa71d6 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ClassTypeHelper.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ClassTypeHelper.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2011 IBM Corporation and others. + * Copyright (c) 2004, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -738,7 +738,7 @@ public class ClassTypeHelper { ICPPClassType[] bases= getAllBases(owner, point); for (ICPPClassType base : bases) { if (!(base instanceof ICPPDeferredClassInstance)) { - ICPPMethod baseMethod= getMethodInClass(base, kind); + ICPPMethod baseMethod= getMethodInClass(base, kind, point); if (baseMethod != null) { IType[] baseExceptionSpec= baseMethod.getExceptionSpecification(); if (baseExceptionSpec == null) @@ -801,17 +801,17 @@ public class ClassTypeHelper { return false; } - private static ICPPMethod getMethodInClass(ICPPClassType ct, int kind) { + private static ICPPMethod getMethodInClass(ICPPClassType ct, int kind, IASTNode point) { switch (kind) { case KIND_DEFAULT_CTOR: case KIND_COPY_CTOR: - for (ICPPConstructor ctor : ct.getConstructors()) { + for (ICPPConstructor ctor : getConstructors(ct, point)) { if (!ctor.isImplicit() && getImplicitMethodKind(ct, ctor) == kind) return ctor; } return null; case KIND_ASSIGNMENT_OP: - for (ICPPMethod method : ct.getDeclaredMethods()) { + for (ICPPMethod method : getDeclaredMethods(ct, point)) { if (method instanceof ICPPConstructor) continue; if (getImplicitMethodKind(ct, method) == kind) @@ -819,7 +819,7 @@ public class ClassTypeHelper { } return null; case KIND_DTOR: - for (ICPPMethod method : ct.getDeclaredMethods()) { + for (ICPPMethod method : getDeclaredMethods(ct, point)) { if (method.isDestructor()) return method; } |