mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Bug 432059 - Fix an "unsafe method call" error
Change-Id: I513a922c9ef6a55c33f5767830aabecaba9da396 Signed-off-by: Nathan Ridge <zeratul976@hotmail.com> Reviewed-on: https://git.eclipse.org/r/24512 Tested-by: Hudson CI Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com> IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com> Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
This commit is contained in:
parent
8aa89d3dd8
commit
b4d65483ed
2 changed files with 5 additions and 2 deletions
|
@ -354,7 +354,10 @@ public class ClassTypeHelper {
|
|||
}
|
||||
|
||||
public static ICPPMethod[] getImplicitMethods(ICPPClassType classType, IASTNode point) {
|
||||
IScope scope = classType.getCompositeScope();
|
||||
return getImplicitMethods(classType.getCompositeScope(), point);
|
||||
}
|
||||
|
||||
public static ICPPMethod[] getImplicitMethods(IScope scope, IASTNode point) {
|
||||
if (scope instanceof ICPPClassSpecializationScope) {
|
||||
return ((ICPPClassSpecializationScope) scope).getImplicitMethods(point);
|
||||
} else if (scope instanceof ICPPClassScope) {
|
||||
|
|
|
@ -648,7 +648,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
|
|||
if (type instanceof ICPPClassType) {
|
||||
ArrayUtil.addAll(old, ClassTypeHelper.getImplicitMethods((ICPPClassType) type, point));
|
||||
}
|
||||
ICPPMethod[] implicit= ((ICPPClassScope) scope).getImplicitMethods();
|
||||
ICPPMethod[] implicit= ClassTypeHelper.getImplicitMethods(scope, point);
|
||||
for (ICPPMethod method : implicit) {
|
||||
if (!(method instanceof IProblemBinding)) {
|
||||
PDOMBinding pdomBinding= adaptBinding(method);
|
||||
|
|
Loading…
Add table
Reference in a new issue