summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/dependent-base-classes.cpp
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/SemaTemplate/dependent-base-classes.cpp
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/SemaTemplate/dependent-base-classes.cpp')
-rw-r--r--clang/test/SemaTemplate/dependent-base-classes.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/SemaTemplate/dependent-base-classes.cpp b/clang/test/SemaTemplate/dependent-base-classes.cpp
index e64d62301ea..895eacc87ed 100644
--- a/clang/test/SemaTemplate/dependent-base-classes.cpp
+++ b/clang/test/SemaTemplate/dependent-base-classes.cpp
@@ -105,7 +105,9 @@ namespace PR6081 {
void f0(const X & k)
{
this->template f1<int>()(k); // expected-error{{'f1' following the 'template' keyword does not refer to a template}} \
- // FIXME: expected-error{{unqualified-id}}
+ // FIXME: expected-error{{unqualified-id}} \
+ // expected-error{{function-style cast or type construction}} \
+ // expected-error{{expected expression}}
}
};
}
OpenPOWER on IntegriCloud