[LLVMbugs] [Bug 20414] New: clang thinks class is incomplete in exception specification

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 23 07:44:10 PDT 2014


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

            Bug ID: 20414
           Summary: clang thinks class is incomplete in exception
                    specification
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: alexandermbock at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

struct B;

struct A {
    B& operator->();
    int foo;
};

struct B {
    auto operator->() -> A*;
    auto f() throw(decltype(A()->foo)) -> void;
};


My understanding is that per 9.2 [class.mem], B should be considered complete
inside of the exception specification, and this code should be valid. gcc (4.8)
and edg-based compilers allow this example without complaint; clang complains:

error: incomplete definition of type 'B'
        auto f() throw(decltype(A()->foo)) -> void;
                                ^~~

note: definition of 'B' is not complete until the closing '}'
struct B {
       ^


clang version 3.5.0 (trunk 213749)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

-- 
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/20140723/4896b493/attachment.html>


More information about the llvm-bugs mailing list