Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352210 - false positive with pure virtual destructors
Summary: false positive with pure virtual destructors
Status: CLOSED DUPLICATE of bug 353360
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 6.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: CDT Codan Inbox CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-15 09:26 EDT by Jakub Zytka CLA
Modified: 2011-08-01 10:36 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***