Provide a better diagnostic when braces are put before the identifier.

Description

Provide a better diagnostic when braces are put before the identifier.

When a user types:

int [4] foo;

assume that the user means:

int foo[4];

Update the information for 'foo' to prevent additional errors, and provide
a fix-it hint to move the brackets to the correct location.

Additionally, suggest parens for types that require it, such as:

int [4] *foo;

to:

int (*foo)[4];

Details

Committed
rtrieuJun 24 2014, 4:14 PM
Parents
rL211640: llvm/test/MC/AArch64/ldr-pseudo-obj-errors.s: Add -triple=aarch64-linux.
Branches
Unknown
Tags
Unknown