https://bugs.llvm.org/show_bug.cgi?id=34094
Bug ID: 34094
Summary: Artificial errors due to parser guessing
Product: clang
Version: 4.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangb...@nondot.org
Reporter: jori...@gmail.com
CC: llvm-bugs@lists.llvm.org
The frontend makes guesses at input errors, such as at missing declarations :
int my_scalars[100];
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 [100]' 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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs