[LLVMbugs] [Bug 8673] New: poor error recovery on incorrect type name in method argument
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Nov 23 10:29:00 PST 2010
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: unassignedclangbugs at nondot.org
ReportedBy: clattner at apple.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
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.
More information about the llvm-bugs
mailing list