[LLVMbugs] [Bug 9781] New: 2 errors given for multiple function definition declared at class scope.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Apr 22 11:59:14 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=9781
Summary: 2 errors given for multiple function definition
declared at class scope.
Product: clang
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: pichet2000 at gmail.com
CC: llvmbugs at cs.uiuc.edu
given test.cpp:
class A {
void foo(){}
void foo(){}
};
clang test.cpp
test.cpp(5) : error: class member cannot be redeclared
void foo(){}
^
test.cpp(4) : note: previous declaration is here
void foo(){}
^
test.cpp(5) : error: redefinition of 'foo'
void foo(){}
^
test.cpp(4) : note: previous definition is here
void foo(){}
^
2 errors generated.
there should be only 1 error here.
--
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