| Summary: | ClassCastException in ClassTypeHelper.getOwnMethods | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Sergey Prigogin <eclipse.sprigogin> |
| Component: | cdt-parser | Assignee: | Sergey Prigogin <eclipse.sprigogin> |
| Status: | RESOLVED FIXED | QA Contact: | Markus Schorn <mschorn.eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug, malaperle |
| Version: | 8.0 | ||
| Target Milestone: | 8.0.1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Sergey Prigogin
Another variation of the problem: java.lang.ClassCastException: org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassType$CPPClassTypeProblem cannot be cast to org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope at org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper.getOwnMethods(ClassTypeHelper.java:319) at org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper.collectPureVirtualMethods(ClassTypeHelper.java:873) at org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper.collectPureVirtualMethods(ClassTypeHelper.java:859) at org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper.getPureVirtualMethods(ClassTypeHelper.java:822) at org.eclipse.cdt.codan.internal.checkers.AbstractClassInstantiationChecker$OnEachClass.reportProblemsIfAbstract(AbstractClassInstantiationChecker.java:191) at org.eclipse.cdt.codan.internal.checkers.AbstractClassInstantiationChecker$OnEachClass.checkClassConstructor(AbstractClassInstantiationChecker.java:155) at org.eclipse.cdt.codan.internal.checkers.AbstractClassInstantiationChecker$OnEachClass.visit(AbstractClassInstantiationChecker.java:132) at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNewExpression.accept(CPPASTNewExpression.java:184) at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTConstructorInitializer.accept(CPPASTConstructorInitializer.java:87) at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTConstructorChainInitializer.accept(CPPASTConstructorChainInitializer.java:124) at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDefinition.accept(CPPASTFunctionDefinition.java:183) at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTCompositeTypeSpecifier.accept(CPPASTCompositeTypeSpecifier.java:172) at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclaration.accept(CPPASTSimpleDeclaration.java:96) at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNamespaceDefinition.accept(CPPASTNamespaceDefinition.java:129) at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNamespaceDefinition.accept(CPPASTNamespaceDefinition.java:129) at org.eclipse.cdt.internal.core.dom.parser.ASTTranslationUnit.accept(ASTTranslationUnit.java:279) at org.eclipse.cdt.codan.internal.checkers.AbstractClassInstantiationChecker.processAst(AbstractClassInstantiationChecker.java:64) at org.eclipse.cdt.codan.core.cxx.model.AbstractIndexAstChecker.processModel(AbstractIndexAstChecker.java:103) at org.eclipse.cdt.codan.internal.core.CodanBuilder.processResource(CodanBuilder.java:149) at org.eclipse.cdt.codan.internal.core.CodanBuilder.runInEditor(CodanBuilder.java:218) at org.eclipse.cdt.codan.core.cxx.internal.model.CxxCodanReconciler.reconciledAst(CxxCodanReconciler.java:38) at org.eclipse.cdt.codan.internal.ui.cxx.CodanCReconciler.reconciled(CodanCReconciler.java:81) at org.eclipse.cdt.internal.ui.editor.CEditor.reconciled(CEditor.java:3198) at org.eclipse.cdt.internal.ui.text.CReconcilingStrategy.reconcile(CReconcilingStrategy.java:108) at org.eclipse.cdt.internal.ui.text.CReconcilingStrategy.reconcile(CReconcilingStrategy.java:73) at org.eclipse.cdt.internal.ui.text.CompositeReconcilingStrategy.reconcile(CompositeReconcilingStrategy.java:84) at org.eclipse.cdt.internal.ui.text.CCompositeReconcilingStrategy.reconcile(CCompositeReconcilingStrategy.java:90) at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:77) at org.eclipse.cdt.internal.ui.text.CReconciler.process(CReconciler.java:408) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206) Fixed in master and cdt_8_0 > 20110830. *** cdt git genie on behalf of Sergey Prigogin ***
Bug 356239 - ClassCastException in ClassTypeHelper.getOwnMethods.
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=fb7d64098f16af1f10c4699807783bd4784d7037
*** cdt git genie on behalf of Sergey Prigogin ***
Bug 356239 - ClassCastException in ClassTypeHelper.getOwnMethods.
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=29a103a4e76481ac25b13b6adebe25c18a559670
*** Bug 354312 has been marked as a duplicate of this bug. *** I just updated to the nightly build and it still happens. classType.getCompositeScope() can return a PDOMCPPUnknownScope even without a IProblemBinding Here is a code snippet from where it triggers exception from codan. See stack trace in bug 356493 comment 3. I suspect that this exception causes codan to generate about 50 bogus warnings in the file I am dealing with. template <typename T> void f() { typename T::type t; } Fixed the PDOMCPPUnknownScope case. *** cdt git genie on behalf of Sergey Prigogin ***
Bug 356239 - ClassCastException in ClassTypeHelper.getOwnMethods.
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=d93f3d35328ad3b24d9452019ae76eba4ec4cd8f
*** cdt git genie on behalf of Sergey Prigogin ***
Bug 356239 - ClassCastException in ClassTypeHelper.getOwnMethods.
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=7d5892884bfb0bdef9cad28cf8c59c7331099f5d
|