1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify %s 2*f4a2713aSLionel Sambuc // RUN: cp %s %t 3*f4a2713aSLionel Sambuc // RUN: not %clang_cc1 -fsyntax-only -fixit -x c++ %t 4*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -pedantic -Werror -x c++ %t 5*f4a2713aSLionel Sambuc // RUN: grep using_suggestion_tyname_ty_dropped_specifier %t 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc // These tests have been separated from typo.cpp to keep the maximum typo 8*f4a2713aSLionel Sambuc // correction counter from ticking over; this causes spurious failures. 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc namespace using_suggestion_ty { 11*f4a2713aSLionel Sambuc namespace N { class AAA {}; } // expected-note {{'AAA' declared here}} 12*f4a2713aSLionel Sambuc using N::AAB; // expected-error {{no member named 'AAB' in namespace 'using_suggestion_ty::N'; did you mean 'AAA'?}} 13*f4a2713aSLionel Sambuc } 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambuc namespace using_suggestion_tyname_ty { 16*f4a2713aSLionel Sambuc namespace N { class AAA {}; } // expected-note {{'AAA' declared here}} 17*f4a2713aSLionel Sambuc using typename N::AAB; // expected-error {{no member named 'AAB' in namespace 'using_suggestion_tyname_ty::N'; did you mean 'AAA'?}} 18*f4a2713aSLionel Sambuc } 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuc namespace using_suggestion_val { FFF()21*f4a2713aSLionel Sambucnamespace N { void FFF() {} } // expected-note {{'FFF' declared here}} 22*f4a2713aSLionel Sambuc using N::FFG; // expected-error {{no member named 'FFG' in namespace 'using_suggestion_val::N'; did you mean 'FFF'?}} 23*f4a2713aSLionel Sambuc } 24*f4a2713aSLionel Sambuc 25*f4a2713aSLionel Sambuc namespace using_suggestion_ty_dropped_specifier { 26*f4a2713aSLionel Sambuc class ABC {}; // expected-note {{'::using_suggestion_ty_dropped_specifier::ABC' declared here}} 27*f4a2713aSLionel Sambuc namespace N { } 28*f4a2713aSLionel Sambuc using N::ABC; // expected-error {{no member named 'ABC' in namespace 'using_suggestion_ty_dropped_specifier::N'; did you mean '::using_suggestion_ty_dropped_specifier::ABC'?}} 29*f4a2713aSLionel Sambuc } 30*f4a2713aSLionel Sambuc 31*f4a2713aSLionel Sambuc namespace using_suggestion_tyname_ty_dropped_specifier { 32*f4a2713aSLionel Sambuc class BCD {}; // expected-note {{'::using_suggestion_tyname_ty_dropped_specifier::BCD' declared here}} 33*f4a2713aSLionel Sambuc namespace N { } 34*f4a2713aSLionel Sambuc using typename N::BCD; // expected-error {{no member named 'BCD' in namespace 'using_suggestion_tyname_ty_dropped_specifier::N'; did you mean '::using_suggestion_tyname_ty_dropped_specifier::BCD'?}} 35*f4a2713aSLionel Sambuc } 36*f4a2713aSLionel Sambuc 37*f4a2713aSLionel Sambuc namespace using_suggestion_val_dropped_specifier { EFG()38*f4a2713aSLionel Sambucvoid EFG() {} // expected-note {{'::using_suggestion_val_dropped_specifier::EFG' declared here}} 39*f4a2713aSLionel Sambuc namespace N { } 40*f4a2713aSLionel Sambuc using N::EFG; // expected-error {{no member named 'EFG' in namespace 'using_suggestion_val_dropped_specifier::N'; did you mean '::using_suggestion_val_dropped_specifier::EFG'?}} 41*f4a2713aSLionel Sambuc } 42*f4a2713aSLionel Sambuc 43*f4a2713aSLionel Sambuc namespace using_suggestion_member_ty { 44*f4a2713aSLionel Sambuc class CCC { public: typedef int AAA; }; // expected-note {{'AAA' declared here}} 45*f4a2713aSLionel Sambuc class DDD : public CCC { public: using CCC::AAB; }; // expected-error {{no member named 'AAB' in 'using_suggestion_member_ty::CCC'; did you mean 'AAA'?}} 46*f4a2713aSLionel Sambuc } 47*f4a2713aSLionel Sambuc 48*f4a2713aSLionel Sambuc namespace using_suggestion_member_val { AAA()49*f4a2713aSLionel Sambucclass CCC { public: void AAA() { } }; // expected-note {{'AAA' declared here}} 50*f4a2713aSLionel Sambuc class DDD : public CCC { public: using CCC::AAB; }; // expected-error {{no member named 'AAB' in 'using_suggestion_member_val::CCC'; did you mean 'AAA'?}} 51*f4a2713aSLionel Sambuc } 52*f4a2713aSLionel Sambuc 53*f4a2713aSLionel Sambuc namespace using_suggestion_member_tyname_ty { 54*f4a2713aSLionel Sambuc class CCC { public: typedef int AAA; }; // expected-note {{'AAA' declared here}} 55*f4a2713aSLionel Sambuc class DDD : public CCC { public: using typename CCC::AAB; }; // expected-error {{no member named 'AAB' in 'using_suggestion_member_tyname_ty::CCC'; did you mean 'AAA'?}} 56*f4a2713aSLionel Sambuc } 57