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

           Summary: Clang rejects out-of-line destructors for classes
                    which are typedef'ed to themselves
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P5
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
   Estimated Hours: 0.0


Despite the prohibition on typedef names being used for destructors, I think
the rules allowing you to typedef something to itself mean we should accept
this.

% cat t.cc
struct S;
typedef struct S S;
struct S { ~S(); };
S::~S() { }

% ./bin/clang++ -fsyntax-only t.cc
t.cc:4:4: error: destructor cannot be declared using a typedef 'S' (aka 'struct
S') of the class name
S::~S() { }
   ^
1 diagnostic generated.

-- 
Configure bugmail: http://www.llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to