Skip to main content
summaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorNathan Ridge2015-12-29 01:19:15 -0500
committerGerrit Code Review @ Eclipse.org2015-12-29 15:13:24 -0500
commitb0d66aa7770645a572f29845320d5b183234d2d0 (patch)
tree5e5f4524249578a2832e92e3b01dc1e941a716c3 /codan
parent03e0264fc13dad191dbdd3366ff1df1cb338a328 (diff)
downloadorg.eclipse.cdt-b0d66aa7770645a572f29845320d5b183234d2d0.tar.gz
org.eclipse.cdt-b0d66aa7770645a572f29845320d5b183234d2d0.tar.xz
org.eclipse.cdt-b0d66aa7770645a572f29845320d5b183234d2d0.zip
Fix an "unsafe method call" error.
Change-Id: I174b14358cdf4252dfb5293c4b86ecfe873fb845 Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Diffstat (limited to 'codan')
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ProblemBindingChecker.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ProblemBindingChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ProblemBindingChecker.java
index a309e728b5..349f48ae00 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ProblemBindingChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ProblemBindingChecker.java
@@ -43,6 +43,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
import org.eclipse.cdt.core.parser.util.CharArrayUtils;
import org.eclipse.cdt.internal.core.dom.parser.ASTQueries;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper;
public class ProblemBindingChecker extends AbstractIndexAstChecker {
public static String ERR_ID_OverloadProblem = "org.eclipse.cdt.codan.internal.checkers.OverloadProblem"; //$NON-NLS-1$
@@ -281,7 +282,7 @@ public class ProblemBindingChecker extends AbstractIndexAstChecker {
}
} else if (candidateBinding instanceof ICPPClassType) {
ICPPClassType classType = (ICPPClassType) candidateBinding;
- for (ICPPFunction constructor : classType.getConstructors()) {
+ for (ICPPFunction constructor : ClassTypeHelper.getConstructors(classType, problemBinding.getASTNode())) {
String signature = getFunctionSignature(constructor);
if (!signature.equals(lastSignature)) {
candidatesString += signature + "\n"; //$NON-NLS-1$

Back to the top