mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 299911. Improved propagation of template instantiation context.
This commit is contained in:
parent
08bfa93081
commit
f6bf583ae2
1 changed files with 6 additions and 6 deletions
|
@ -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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -738,7 +738,7 @@ public class ClassTypeHelper {
|
||||||
ICPPClassType[] bases= getAllBases(owner, point);
|
ICPPClassType[] bases= getAllBases(owner, point);
|
||||||
for (ICPPClassType base : bases) {
|
for (ICPPClassType base : bases) {
|
||||||
if (!(base instanceof ICPPDeferredClassInstance)) {
|
if (!(base instanceof ICPPDeferredClassInstance)) {
|
||||||
ICPPMethod baseMethod= getMethodInClass(base, kind);
|
ICPPMethod baseMethod= getMethodInClass(base, kind, point);
|
||||||
if (baseMethod != null) {
|
if (baseMethod != null) {
|
||||||
IType[] baseExceptionSpec= baseMethod.getExceptionSpecification();
|
IType[] baseExceptionSpec= baseMethod.getExceptionSpecification();
|
||||||
if (baseExceptionSpec == null)
|
if (baseExceptionSpec == null)
|
||||||
|
@ -801,17 +801,17 @@ public class ClassTypeHelper {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ICPPMethod getMethodInClass(ICPPClassType ct, int kind) {
|
private static ICPPMethod getMethodInClass(ICPPClassType ct, int kind, IASTNode point) {
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
case KIND_DEFAULT_CTOR:
|
case KIND_DEFAULT_CTOR:
|
||||||
case KIND_COPY_CTOR:
|
case KIND_COPY_CTOR:
|
||||||
for (ICPPConstructor ctor : ct.getConstructors()) {
|
for (ICPPConstructor ctor : getConstructors(ct, point)) {
|
||||||
if (!ctor.isImplicit() && getImplicitMethodKind(ct, ctor) == kind)
|
if (!ctor.isImplicit() && getImplicitMethodKind(ct, ctor) == kind)
|
||||||
return ctor;
|
return ctor;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
case KIND_ASSIGNMENT_OP:
|
case KIND_ASSIGNMENT_OP:
|
||||||
for (ICPPMethod method : ct.getDeclaredMethods()) {
|
for (ICPPMethod method : getDeclaredMethods(ct, point)) {
|
||||||
if (method instanceof ICPPConstructor)
|
if (method instanceof ICPPConstructor)
|
||||||
continue;
|
continue;
|
||||||
if (getImplicitMethodKind(ct, method) == kind)
|
if (getImplicitMethodKind(ct, method) == kind)
|
||||||
|
@ -819,7 +819,7 @@ public class ClassTypeHelper {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
case KIND_DTOR:
|
case KIND_DTOR:
|
||||||
for (ICPPMethod method : ct.getDeclaredMethods()) {
|
for (ICPPMethod method : getDeclaredMethods(ct, point)) {
|
||||||
if (method.isDestructor())
|
if (method.isDestructor())
|
||||||
return method;
|
return method;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue