Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352210

Summary: false positive with pure virtual destructors
Product: [Tools] CDT Reporter: Jakub Zytka <kubol>
Component: cdt-codanAssignee: CDT Codan Inbox <cdt-codan-inbox>
Status: CLOSED DUPLICATE QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: normal    
Priority: P3 CC: cdtdoug, eclipse.sprigogin, malaperle, xgsa
Version: 6.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Jakub Zytka CLA 2011-07-15 09:26:44 EDT
Build Identifier: 20110615-0604

This bug is related to bug 326269 (esp. see https://bugs.eclipse.org/bugs/show_bug.cgi?id=326269#c18) 

Consider following code:
class A {
 public:
  virtual ~A() = 0;
};
A::~A() {};

class B : public A {
};

B b; // <- invalid codan message "The type 'B' must implement the inherited pure virtual method  'A::~A'

Compiler is obliged to provide destructor for class B, so codan shouldn't complain. 

Reproducible: Always
Comment 1 Sergey Prigogin CLA 2011-08-01 10:36:31 EDT

*** This bug has been marked as a duplicate of bug 353360 ***