[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / ASTMerge / namespace / Inputs / namespace2.cpp
blobf65057d1ca66c63830a16b10fca59639ccf841fb
1 // Merge success
2 namespace N1 {
3 extern int x0;
6 // Merge multiple namespaces
7 namespace N2 {
8 extern int x;
10 namespace N2 {
11 extern float y;
14 // Merge namespace with conflict
15 namespace N3 {
16 extern double z;
19 namespace Enclosing {
20 namespace Nested {
21 const int z = 4;
25 namespace ContainsInline {
26 inline namespace Inline {
27 const int z = 10;
31 namespace TestAliasName = Enclosing::Nested;
32 // NOTE: There is no warning on this alias.
33 namespace AliasWithSameName = Enclosing::Nested;
35 namespace TestUsingDecls {
37 namespace A {
38 void foo();
40 namespace B {
41 using A::foo; // <- a UsingDecl creating a UsingShadow
44 }// end namespace TestUsingDecls
46 namespace TestUnresolvedTypenameAndValueDecls {
48 template <class T> class Base;
49 template <class T> class Derived : public Base<T> {
50 public:
51 using typename Base<T>::foo;
52 using Base<T>::bar;
53 typedef typename Derived::foo NewUnresolvedUsingType;
56 } // end namespace TestUnresolvedTypenameAndValueDecls
58 namespace TestUsingNamespace {
59 using namespace Enclosing;