Extend warnings for missing '@end'.
Fixes PR2709.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145928 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/missing-end-2.m b/test/Parser/missing-end-2.m
index 63dc965..e89f28e 100644
--- a/test/Parser/missing-end-2.m
+++ b/test/Parser/missing-end-2.m
@@ -1,19 +1,19 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
// rdar: //7824372
-@interface A
+@interface A // expected-note {{class started here}}
-(void) im0;
-@implementation A // expected-error {{missing @end}}
+@implementation A // expected-error {{missing '@end'}}
@end
-@interface B {
+@interface B { // expected-note {{class started here}}
}
-@implementation B // expected-error {{missing @end}}
+@implementation B // expected-error {{missing '@end'}}
@end
-@interface C
+@interface C // expected-note 2 {{class started here}}
@property int P;
-@implementation C // expected-error 2 {{missing @end}}
+@implementation C // expected-error 2 {{missing '@end'}}
diff --git a/test/Parser/missing-end-3.m b/test/Parser/missing-end-3.m
index 3b22637..4875ecd 100644
--- a/test/Parser/missing-end-3.m
+++ b/test/Parser/missing-end-3.m
@@ -1,10 +1,10 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
// rdar://8283484
-@interface blah {
+@interface blah { // expected-note {{class started here}}
@private
}
// since I forgot the @end here it should say something
-@interface blah // expected-error {{missing @end}}
+@interface blah // expected-error {{missing '@end'}}
@end // and Unknown type name 'end' here
diff --git a/test/Parser/missing-end.m b/test/Parser/missing-end.m
index fb26461..d66ea64 100644
--- a/test/Parser/missing-end.m
+++ b/test/Parser/missing-end.m
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-@interface AAA
+@interface AAA // expected-note {{class started here}}
{
}
@ x// expected-error{{expected an Objective-C directive after '@'}}
-// expected-error{{missing @end}}
+// expected-error{{missing '@end'}}
diff --git a/test/Parser/objc-missing-impl.m b/test/Parser/objc-missing-impl.m
index e9c37ab..791b9f8 100644
--- a/test/Parser/objc-missing-impl.m
+++ b/test/Parser/objc-missing-impl.m
@@ -1,2 +1,2 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-@end // expected-error {{@end must appear in an @implementation context}}
+@end // expected-error {{'@end' must appear in an Objective-C context}}
diff --git a/test/Parser/objc-quirks.m b/test/Parser/objc-quirks.m
index 591bca2..72cb1e1 100644
--- a/test/Parser/objc-quirks.m
+++ b/test/Parser/objc-quirks.m
@@ -5,8 +5,8 @@
// rdar://6480479
-@interface A
-}; // expected-error {{missing @end}} \
+@interface A // expected-note {{class started here}}
+}; // expected-error {{missing '@end'}} \
// expected-error {{expected external declaration}} \
// expected-warning{{extra ';' outside of a function}}