[llvm-bugs] [Bug 34094] New: Artificial errors due to parser guessing
llvm-bugs at lists.llvm.org
Sun Aug 6 22:51:22 PDT 2017
Bug ID: 34094
Summary: Artificial errors due to parser guessing
Assignee: unassignedclangbugs at nondot.org
Reporter: joriswu at gmail.com
CC: llvm-bugs at lists.llvm.org
The frontend makes guesses at input errors, such as at missing declarations :
int foo(int x)
my_scalar = 1;
// here we forgot to declare my_scalar as a plain int. First, the compiler
correctly emits :
error: use of undeclared 'my_scalar'; did you mean 'my_scalars' ?
But then the parser appears to actually insert the assumed array into the code,
and issues a false subsequent error that is misleading :
error: array type 'int ' is not assignable
I have seen more examples, where the 'guess' is actually used.
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs