r236337 - Eagerly correct typos in ParenExprs that may be type casts for non-C++ code.

Dimitry Andric dimitry at andric.com
Fri May 1 15:03:44 PDT 2015


On 01 May 2015, at 21:36, Kaelyn Takata <rikka at google.com> wrote:
> 
> Author: rikka
> Date: Fri May  1 14:36:25 2015
> New Revision: 236337
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=236337&view=rev
> Log:
> Eagerly correct typos in ParenExprs that may be type casts for non-C++ code.
> 
> This is needed to ensure the type casts are parsed properly. Fixes
> PR23101.

I had hoped this would also fix http://llvm.org/PR23285, but unfortunately it does not:

$ ~/obj/llvm-236349-trunk-freebsd11-i386-ninja-rel-1/bin/clang -cc1 -triple x86_64-unknown-freebsd11.0 -emit-obj testcase.c
testcase.c:1:1: warning: type specifier missing, defaults to 'int'
a = 0(uintmax_t
^
testcase.c:1:16: error: expected ')'
a = 0(uintmax_t
               ^
testcase.c:1:6: note: to match this '('
a = 0(uintmax_t
     ^
testcase.c:1:16: error: expected ';' after top level declarator
a = 0(uintmax_t
               ^
               ;
Assertion failed: (DelayedTypos.empty() && "Uncorrected typos!"), function ~Sema, file /share/dim/src/llvm/trunk/tools/clang/lib/Sema/Sema.cpp, line 273.
Abort trap (core dumped)

Any idea? :-)

-Dimitry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150502/6bcab515/attachment.sig>


More information about the cfe-commits mailing list