http://llvm.org/bugs/show_bug.cgi?id=11424
Bug #: 11424
Summary: fails to report missing semicolon if followed by
constructor decl
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
This small snippet:
class A {
class B {
int x;
} // <-- missing semicolon
int i;
};
is reported correctly by clang. However, if you write:
class A {
class B {
int x;
}
A();
};
then we instead spew:
test.cc:5:3: error: member 'A' has the same name as its class
A() {}
^
test.cc:2:9: error: 'A::B' can not be defined in the result type of a function
class B {
^
test.cc:5:3: error: constructor cannot have a return type
A() {}
^
3 errors generated.
We should report the missing semicolon as we do in the other cases.
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs