summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-17 22:25:06 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-17 22:25:06 +0000
commit29d907de03b88da9f4222299e95ecbf3af150d8c (patch)
treed42149bc70406c10b2cfa44c952f4d8daff07b01 /clang/test/SemaObjC
parentb3e8712a1437d8eccf17e3df5efb7fb0e2f4d35b (diff)
downloadbcm5719-llvm-29d907de03b88da9f4222299e95ecbf3af150d8c.tar.gz
bcm5719-llvm-29d907de03b88da9f4222299e95ecbf3af150d8c.zip
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
Diffstat (limited to 'clang/test/SemaObjC')
-rw-r--r--clang/test/SemaObjC/crash-label.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaObjC/crash-label.m b/clang/test/SemaObjC/crash-label.m
index ffcb46344e2..405d6bfd49e 100644
--- a/clang/test/SemaObjC/crash-label.m
+++ b/clang/test/SemaObjC/crash-label.m
@@ -7,4 +7,4 @@ 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 '{'}}
- Exit: if(_ciKernel && !success ) { // expected-error {{use of undeclared identifier}} // expected-error 2 {{expected}} expected-note{{to match this '{'}}
+ 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'}}
OpenPOWER on IntegriCloud