[llvm-bugs] [Bug 24909] New: Incorrect error message text for instantiating abstract class

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 22 10:03:34 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24909

            Bug ID: 24909
           Summary: Incorrect error message text for instantiating
                    abstract class
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: OmnipotentEntity at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

When attempting to instantiate an abstract class clang returns:

test.cc:18:5: error: variable type 'A' is an abstract class
  A a;
    ^
test.cc:4:16: note: unimplemented pure virtual method 'a' in 'A'
  virtual void a()=0;

The second line claims that A::a() is unimplemented.  It does this even if you
include an implementation.  This is incorrect and potentially misleading.

struct A {
  virtual void a()=0;
};

void A::a() {}

int main() {
  A a;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150922/0b728b9c/attachment.html>


More information about the llvm-bugs mailing list