diff options
Diffstat (limited to 'test/SemaCXX/typo-correction.cpp')
-rw-r--r-- | test/SemaCXX/typo-correction.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/SemaCXX/typo-correction.cpp b/test/SemaCXX/typo-correction.cpp index c21ef51..caa6355 100644 --- a/test/SemaCXX/typo-correction.cpp +++ b/test/SemaCXX/typo-correction.cpp @@ -236,3 +236,27 @@ void test() { return status; // expected-error-re{{use of undeclared identifier 'status'$}} } } + +namespace PR13387 { +struct A { + void CreateFoo(float, float); // expected-note {{'CreateFoo' declared here}} + void CreateBar(float, float); +}; +struct B : A { + using A::CreateFoo; + void CreateFoo(int, int); +}; +void f(B &x) { + x.Createfoo(0,0); // expected-error {{no member named 'Createfoo' in 'PR13387::B'; did you mean 'CreateFoo'?}} +} +} + +struct DataStruct {void foo();}; +struct T { + DataStruct data_struct; + void f(); +}; +// should be void T::f(); +void f() { + data_struct->foo(); // expected-error-re{{use of undeclared identifier 'data_struct'$}} +} |