diff options
Diffstat (limited to 'test/FixIt')
| -rw-r--r-- | test/FixIt/fixit.cpp | 17 | ||||
| -rw-r--r-- | test/FixIt/typo-crash.m | 6 | ||||
| -rw-r--r-- | test/FixIt/typo.m | 2 |
3 files changed, 16 insertions, 9 deletions
diff --git a/test/FixIt/fixit.cpp b/test/FixIt/fixit.cpp index 04b99c941654..ee93755775e5 100644 --- a/test/FixIt/fixit.cpp +++ b/test/FixIt/fixit.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -pedantic -fixit %s -o - | %clang_cc1 -fsyntax-only -pedantic -Werror -x c++ - +// RUN: %clang_cc1 -pedantic -Wall -fixit %s -o - | %clang_cc1 -fsyntax-only -pedantic -Wall -Werror -x c++ - /* This is a test of the various code modification hints that are provided as part of warning or extension diagnostics. All of the @@ -28,11 +28,12 @@ struct CT<0> { }; // expected-error{{'template<>'}} template<> class CT<1> { }; // expected-error{{tag type}} -// PR5444 -namespace PR5444 { - void foo(int x, int y = 0); - void foo(int x, int y = 0) { } +// Access declarations +class A { +protected: + int foo(); +}; - void foo(int = 0); - void foo(int = 0) { } -} +class B : public A { + A::foo; // expected-warning{{access declarations are deprecated}} +}; diff --git a/test/FixIt/typo-crash.m b/test/FixIt/typo-crash.m new file mode 100644 index 000000000000..f10fe61ae78e --- /dev/null +++ b/test/FixIt/typo-crash.m @@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// <rdar://problem/7605289> +@implementation Unknown (Blarg) // expected-error{{cannot find interface declaration for 'Unknown'}} +- (int)method { return ivar; } // expected-error{{use of undeclared identifier 'ivar'}} +@end diff --git a/test/FixIt/typo.m b/test/FixIt/typo.m index c2069dd4169d..86dd383c904e 100644 --- a/test/FixIt/typo.m +++ b/test/FixIt/typo.m @@ -86,5 +86,5 @@ void test2(Collide *a) { - (int)send:(void*)buffer bytes:(int)bytes; @end -@interface IPv8 <Network_Socket> // expected-error{{cannot find protocol declaration for 'Network_Socket'; did you mean 'NetworkSocket'?}} +@interface IPv6 <Network_Socket> // expected-error{{cannot find protocol declaration for 'Network_Socket'; did you mean 'NetworkSocket'?}} @end |
