Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2011-07-31 01:59:14 -0400
committerSergey Prigogin2011-07-31 02:03:30 -0400
commit33c2e373d4d562de2fe1dadf3afd7bf1ad1db265 (patch)
tree6225404669e030a1ce9fa59e6103aa2781d6e39e /codan/org.eclipse.cdt.codan.checkers
parent14afc9f4f44602d7ddf351a2f391c4a3702e1b61 (diff)
downloadorg.eclipse.cdt-33c2e373d4d562de2fe1dadf3afd7bf1ad1db265.tar.gz
org.eclipse.cdt-33c2e373d4d562de2fe1dadf3afd7bf1ad1db265.tar.xz
org.eclipse.cdt-33c2e373d4d562de2fe1dadf3afd7bf1ad1db265.zip
Bug 353360 - Bogus "type must implement the inherited pure virtual
method" error. Fix and test case.
Diffstat (limited to 'codan/org.eclipse.cdt.codan.checkers')
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AbstractClassInstantiationChecker.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AbstractClassInstantiationChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AbstractClassInstantiationChecker.java
index 33028a04ed..41714eb89b 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AbstractClassInstantiationChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AbstractClassInstantiationChecker.java
@@ -186,10 +186,8 @@ public class AbstractClassInstantiationChecker extends AbstractIndexAstChecker {
IType unwindedType = CxxAstUtils.getInstance().unwindTypedef(typeToCheck);
if (unwindedType instanceof ICPPClassType) {
ICPPClassType classType = (ICPPClassType) unwindedType;
- ICPPMethod[] pureVirtualMethods;
- if (pureVirtualMethodsCache.containsKey(classType)) {
- pureVirtualMethods = pureVirtualMethodsCache.get(classType);
- } else {
+ ICPPMethod[] pureVirtualMethods = pureVirtualMethodsCache.get(classType);
+ if (pureVirtualMethods == null) {
pureVirtualMethods = ClassTypeHelper.getPureVirtualMethods(classType);
pureVirtualMethodsCache.put(classType, pureVirtualMethods);
}

Back to the top