[LLVMbugs] [Bug 12658] New: Fail to detect instantiating abstract type

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 25 15:37:49 PDT 2012


             Bug #: 12658
           Summary: Fail to detect instantiating abstract type
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: weimingz at codeaurora.org
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 8450
  --> http://llvm.org/bugs/attachment.cgi?id=8450
test case

Clangs fails to detect the error in the following code:

#include <stdio.h>

class C {
    int x;
    C(int v) :x(v) {}
    virtual void f() = 0;

int main(int argc, char** argv) {
  printf("c.x=%d\n", C(99).x);    // should raise an error

clang version 3.1 (branches/release_31 154941)

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.

More information about the llvm-bugs mailing list