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

           Summary: Clang rejects an out-of-line destructor declaration
                    with the same name as a global function with horrible
                    diagnostic
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
   Estimated Hours: 0.0


% cat t.cc                        
void Foo();
struct Foo {
  virtual ~Foo();
};
Foo::~Foo() { }
void Foo() { }

% ./bin/clang++ -fsyntax-only t.cc
t.cc:5:7: error: expected the class name after '~' to name a destructor
Foo::~Foo() { }
      ^
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