http://llvm.org/bugs/show_bug.cgi?id=8673
Summary: poor error recovery on incorrect type name in method
argument
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
This code:
class ABC;
class foo {
void bar(ABC *X);
};
void foo::bar(DEF *X) {
}
produces:
t.cc:8:11: error: variable has incomplete type 'void'
void foo::bar(DEF *X) {
^
t.cc:8:15: error: use of undeclared identifier 'DEF'
void foo::bar(DEF *X) {
^
t.cc:8:20: error: use of undeclared identifier 'X'
void foo::bar(DEF *X) {
^
t.cc:8:22: error: expected ';' after top level declarator
void foo::bar(DEF *X) {
^
;
4 errors generated.
because the parser gets to DEF (which it doesn't know, and decides that DEF
isn't or couldn't be a type, so it backtracks and parses the code as "void
foo;" which goes horribly wrong downstream.
--
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