1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // (this actually occurs before paragraph 1)
7 using namespace A
; // expected-error {{'using namespace' is not allowed in classes}}
15 // Test that names appear as if in deepest common ancestor.
19 opaque0
foo(); // expected-note {{candidate}}
24 opaque1
foo(); // expected-note {{candidate}}
28 return foo(); // C::foo
35 return foo(); // expected-error {{call to 'foo' is ambiguous}}
39 // Same thing, but with the directives in namespaces.
43 opaque0
foo(); // expected-note {{candidate}}
48 opaque1
foo(); // expected-note {{candidate}}
54 return foo(); // C::foo
64 return foo(); // expected-error {{call to 'foo' is ambiguous}}
99 // Transitivity acts like synthetic using directives.
103 opaque0
foo(); // expected-note {{candidate}}
108 using namespace A::B
;
111 opaque1
foo(); // expected-note {{candidate}}
125 using namespace A::D
;
126 return foo(); // expected-error {{call to 'foo' is ambiguous}}
130 // Bug: using directives should be followed when parsing default
131 // arguments in scoped declarations.
138 using namespace Test5
;
139 int test5::inc(int x
= default_x
) {