[LLVMbugs] [Bug 5864] poor error recovery for incorrect typename

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 21 16:22:10 PDT 2012


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

Kaelyn Uhrain <rikka at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |rikka at google.com
         Resolution|                            |FIXED

--- Comment #10 from Kaelyn Uhrain <rikka at google.com> 2012-06-21 18:22:10 CDT ---
$ cat t.c
int foo(bar_t x) {
  return x+x;
}


In the 3.1 release, clang does the right thing in C mode:

$ clang -fsyntax-only t.c                                                       
t.c:1:9: error: unknown type name 'bar_t'
int foo(bar_t x) {
        ^
1 error generated.


The bogus errors in C++ mode exist in 3.1 but have since been fixed. With clang
built at r158931:

$ ./bin/clang -fsyntax-only -x c++ t.c
t.c:1:9: error: unknown type name 'bar_t'
int foo(bar_t x) {
        ^
1 error generated.

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