aboutsummaryrefslogtreecommitdiff
path: root/test/Modules
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-08-23 20:19:14 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-08-23 20:19:14 +0000
commit40b2e19cae6ab85407856c70f76278f9efbeeb7c (patch)
tree33b64a284db290fe463964aaccecf55beff1026c /test/Modules
parent42b60551eff3a424e191b293bfd606559dc96bff (diff)
When disambiguating an expression-statement from a declaraton-statement, if the
statement starts with an identifier for which name lookup will fail either way, look at later tokens to disambiguate in order to improve error recovery. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162464 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules')
-rw-r--r--test/Modules/module-private.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/Modules/module-private.cpp b/test/Modules/module-private.cpp
index 246dcaf80e..31a3410a03 100644
--- a/test/Modules/module-private.cpp
+++ b/test/Modules/module-private.cpp
@@ -12,9 +12,12 @@ void test() {
}
int test_broken() {
- HiddenStruct hidden; // expected-error{{use of undeclared identifier 'HiddenStruct'}}
+ HiddenStruct hidden; // \
+ // expected-error{{must use 'struct' tag to refer to type 'HiddenStruct' in this scope}} \
+ // expected-error{{definition of 'struct HiddenStruct' must be imported}}
+ // expected-note@3 {{previous definition is here}}
- Integer i; // expected-error{{use of undeclared identifier 'Integer'}}
+ Integer i; // expected-error{{unknown type name 'Integer'}}
int *ip = 0;
f1(ip); // expected-error{{use of undeclared identifier 'f1'}}