Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Parser / cxx-using-directive.cpp
blob5efd991c8e7acd61cdcdfb5cafb45b1b9bd960a5
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 class A {};
5 namespace B {
6 namespace A {} // expected-note{{namespace '::B::A' defined here}} \
7 // expected-note 2{{namespace 'B::A' defined here}}
8 using namespace A ;
11 namespace C {} // expected-note{{namespace 'C' defined here}}
13 namespace D {
15 class C {
17 using namespace B ; // expected-error{{not allowed}}
20 namespace B {}
22 using namespace C ;
23 using namespace B::A ; // expected-error{{no namespace named 'A' in namespace 'D::B'; did you mean '::B::A'?}}
24 using namespace ::B::A ;
25 using namespace ::D::F ; // expected-error{{expected namespace name}}
26 using namespace ::D::C ; // expected-error{{no namespace named 'C' in namespace 'D'; did you mean simply 'C'?}}
29 using namespace ! ; // expected-error{{expected namespace name}}
30 using namespace A ; // expected-error{{no namespace named 'A'; did you mean 'B::A'?}}
31 using namespace ::A // expected-error{{no namespace named 'A' in the global namespace; did you mean 'B::A'?}} \
32 // expected-error{{expected ';' after namespace name}}
33 B ;
35 void test_nslookup() {
36 int B;
37 class C;
38 using namespace B;
39 using namespace C;