[llvm-bugs] [Bug 32099] New: Arrays of abstract types are incorrectly accepted for class templates.

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 1 01:48:26 PST 2017


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

            Bug ID: 32099
           Summary: Arrays of abstract types are incorrectly accepted for
                    class templates.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: eric at efcs.ca
                CC: llvm-bugs at lists.llvm.org

// Reproducer: clang++ -std=c++14 test.cpp
                 struct A { virtual void f() = 0; };
template <class> struct B { virtual void f() = 0; };

auto a = static_cast<A(*)[1]>(nullptr); // correctly rejected.
auto b = static_cast<B<int>(*)[1]>(nullptr); // incorrectly accepted.

-- 
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/20170301/9d14cc57/attachment.html>


More information about the llvm-bugs mailing list