http://llvm.org/bugs/show_bug.cgi?id=8767
Summary: show unimplemented methods in "abstract type" error
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Clang could do a better job on this testcase:
struct Base {
virtual void NewPureMethod() = 0;
};
struct Derived : public Base {
};
void test() {
new Derived;
}
What we get is ... pretty good actually:
b3268147.cc:7:7: error: allocation of an object of abstract type 'Derived'
new Derived;
^
b3268147.cc:2:16: note: pure virtual function 'NewPureMethod'
virtual void NewPureMethod() = 0;
^
1 error generated.
What's interesting about the note is that it doesn't say what's wrong. Why yes,
that is a pure virtual function. What would be awesome is if it told us what to
fix.
How about:
error: allocating type 'Derived' which is an abstract class
note: unimplemented pure virtual method 'NewPureMethod' in 'Derived'
?
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs