summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/elaborated-type-specifier.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
commit200b2921390bd75a659be3c77011e9a5548b7273 (patch)
tree39ce28af5e0b23bfa0edb0aaeb1bc9d50d30896f /test/SemaCXX/elaborated-type-specifier.cpp
parent23c0104bb8ad04f06804bd399cbc1f5f962b356c (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114225 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/elaborated-type-specifier.cpp')
-rw-r--r--test/SemaCXX/elaborated-type-specifier.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/SemaCXX/elaborated-type-specifier.cpp b/test/SemaCXX/elaborated-type-specifier.cpp
index 2d0b571e02..760079f3b0 100644
--- a/test/SemaCXX/elaborated-type-specifier.cpp
+++ b/test/SemaCXX/elaborated-type-specifier.cpp
@@ -35,7 +35,8 @@ namespace NS {
}
void test_S5_scope() {
- S4 *s4; // expected-error{{use of undeclared identifier 'S4'}}
+ S4 *s4; // expected-error{{use of undeclared identifier 'S4'}} \
+ // expected-error{{use of undeclared identifier 's4'}}
}
int test_funcparam_scope(struct S5 * s5) {