2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2009-08-29 01:53:05 +08:00
|
|
|
|
|
|
|
- (NSDictionary*) _executeScript:(NSString *)source { // expected-error 2 {{expected a type}} \
|
|
|
|
// expected-error {{missing context for method declaration}}
|
2010-09-01 23:49:26 +08:00
|
|
|
Exit: [nilArgs release]; // expected-error {{use of undeclared identifier}}
|
|
|
|
}
|
|
|
|
- (NSDictionary *) _setupKernelStandardMode:(NSString *)source { // expected-error 2 {{expected a type}} \
|
|
|
|
expected-error {{missing context for method declaration}} \
|
|
|
|
expected-note{{to match this '{'}}
|
When we run into an error parsing or type-checking the left-hand side
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
2010-09-18 06:25:06 +08:00
|
|
|
Exit: if(_ciKernel && !success ) { // expected-error {{use of undeclared identifier}} // expected-error 2 {{expected}} expected-note{{to match this '{'}} expected-error{{use of undeclared identifier 'success'}}
|