[LLVMbugs] [Bug 7904] New: clang c++ missing diagnostic for destructor declared as template

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Aug 14 18:55:51 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7904

           Summary: clang c++ missing diagnostic for destructor declared
                    as template
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: crash-on-invalid
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Testcase:
struct Foo {
    template <int i> ~Foo() {}
};
Foo f;

Crashes with:
clang: /home/eli/llvmgbuild/include/llvm/Support/Casting.h:202: typename
llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
clang::CXXDestructorDecl, Y = clang::NamedDecl*]: Assertion `isa<X>(Val) &&
"cast<Ty>() argument of incompatible type!"' failed.

-- 
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