mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-13 19:24:21 +00:00
29d907de03
of a binary expression, continue on and parse the right-hand side of the binary expression anyway, but don't call the semantic actions to type-check. Previously, we would see the error and then, effectively, skip tokens until the end of the statement. The result should be more useful recovery, both in the normal case (we'll actually see errors beyond the first one in a statement), but it also helps code completion do a much better job, because we do "real" code completion on the right-hand side of an invalid binary expression rather than completing with the recovery completion. For example, given x = p->y if there is no variable named "x", we can still complete after the p-> as a member expression. Along the recovery path, we would have completed after the "->" as if we were in an expression context, which is mostly useless. llvm-svn: 114225
13 lines
479 B
C++
13 lines
479 B
C++
/* FIXME: This is a file containing various typos for which we can
|
|
suggest corrections but are unable to actually recover from
|
|
them. Ideally, we would eliminate all such cases and move these
|
|
tests elsewhere. */
|
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
float f(int y) {
|
|
return static_cst<float>(y); // expected-error{{use of undeclared identifier 'static_cst'; did you mean 'static_cast'?}} \
|
|
// expected-error{{for function-style cast or type construction}}
|
|
}
|
|
|