1 // RUN: clang-import-test -dump-ast -import %S/Inputs/F.cpp -expression %s | FileCheck %s
3 // The implicit UsingDirectiveDecls for the anonymous namespaces are created by the Sema.
5 // There might be another builtin namespace before our first namespace, so we can't
6 // just look for NamespaceDecl. Instead look for the first line of F.cpp (which only
7 // contains the namespace we are looking for but no other decl).
9 // The nested anonymous namespace.
10 // CHECK-NEXT: NamespaceDecl
11 // CHECK-SAME: line:21:11
12 // CHECK: FunctionDecl
14 // CHECK-NEXT: CompoundStmt
15 // This is for the nested anonymous namespace.
16 // CHECK-NEXT: UsingDirectiveDecl
18 // CHECK: FunctionDecl
20 // CHECK-NEXT: CompoundStmt
21 // CHECK-NEXT: UsingDirectiveDecl
24 // CHECK: NamespaceDecl
25 // CHECK-SAME: test_namespace1
26 // CHECK-NEXT: NamespaceDecl
27 // CHECK: FunctionDecl
29 // CHECK-NEXT: CompoundStmt
30 // CHECK-NEXT: UsingDirectiveDecl
33 // CHECK-NEXT: NamespaceDecl
34 // CHECK-SAME: test_namespace2
35 // CHECK-NEXT: NamespaceDecl
36 // CHECK-NEXT: NamespaceDecl
37 // CHECK-SAME: test_namespace3
38 // CHECK: FunctionDecl
40 // CHECK-NEXT: CompoundStmt
41 // CHECK-NEXT: UsingDirectiveDecl
46 test_namespace1::func2();
47 test_namespace2::test_namespace3::func3();