[TableGen] Fix validateOperandClass for non Phyical Reg (#118146)
[llvm-project.git] / clang / test / Import / cxx-anon-namespace / test.cpp
blobe7668cc36f0e8016a17fb75398ab4f211024a499
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).
8 // CHECK: F.cpp:1:1
9 // The nested anonymous namespace.
10 // CHECK-NEXT: NamespaceDecl
11 // CHECK-SAME: line:21:11
12 // CHECK: FunctionDecl
13 // CHECK-SAME: func4
14 // CHECK-NEXT: CompoundStmt
15 // This is for the nested anonymous namespace.
16 // CHECK-NEXT: UsingDirectiveDecl
17 // CHECK-SAME: ''
18 // CHECK: FunctionDecl
19 // CHECK-SAME: func1
20 // CHECK-NEXT: CompoundStmt
21 // CHECK-NEXT: UsingDirectiveDecl
22 // CHECK-SAME: ''
24 // CHECK: NamespaceDecl
25 // CHECK-SAME: test_namespace1
26 // CHECK-NEXT: NamespaceDecl
27 // CHECK: FunctionDecl
28 // CHECK-SAME: func2
29 // CHECK-NEXT: CompoundStmt
30 // CHECK-NEXT: UsingDirectiveDecl
31 // CHECK-SAME: ''
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
39 // CHECK-SAME: func3
40 // CHECK-NEXT: CompoundStmt
41 // CHECK-NEXT: UsingDirectiveDecl
42 // CHECK-SAME: ''
44 void expr() {
45 func1();
46 test_namespace1::func2();
47 test_namespace2::test_namespace3::func3();
48 func4();