[LLVMbugs] [Bug 6864] New: poor recovery after typo

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Apr 17 21:05:30 PDT 2010


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

           Summary: poor recovery after typo
           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


In this example:

typedef int mytype_t;

int foo() {
  mytype_tt x;
  return x+x;
} 

I get two errors:

t.cpp:5:3: error: use of undeclared identifier 'mytype_tt'; did you mean
      'mytype_t'?
  mytype_tt x;
  ^
t.cpp:6:10: error: use of undeclared identifier 'x'
  return x+x;
         ^

The first one is great (but missing a fixit), the second is completely bogus. 
Clang should recover and continue parsing the code as if I wrote "mytype_t".

-- 
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