diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeCompletion/namespace-alias.cpp | 22 | ||||
-rw-r--r-- | clang/test/CodeCompletion/namespace.cpp | 15 | ||||
-rw-r--r-- | clang/test/CodeCompletion/using-namespace.cpp | 24 | ||||
-rw-r--r-- | clang/test/CodeCompletion/using.cpp | 27 |
4 files changed, 88 insertions, 0 deletions
diff --git a/clang/test/CodeCompletion/namespace-alias.cpp b/clang/test/CodeCompletion/namespace-alias.cpp new file mode 100644 index 00000000000..8d70c4517d8 --- /dev/null +++ b/clang/test/CodeCompletion/namespace-alias.cpp @@ -0,0 +1,22 @@ +// RUN: clang-cc -fsyntax-only -code-completion-dump=1 %s -o - | FileCheck -check-prefix=CC1 %s && +// RUN: true + +namespace N4 { + namespace N3 { } +} + +class N3; + +namespace N2 { + namespace I1 { } + namespace I4 = I1; + namespace I5 { } + namespace I1 { } + + // CHECK-CC1: I1 : 1 + // CHECK-CC1: I4 : 1 + // CHECK-CC1: I5 : 1 + // CHECK-CC1: N2 : 2 + // CHECK-NEXT-CC1: N4 : 2 + namespace New = + diff --git a/clang/test/CodeCompletion/namespace.cpp b/clang/test/CodeCompletion/namespace.cpp new file mode 100644 index 00000000000..db841248ab7 --- /dev/null +++ b/clang/test/CodeCompletion/namespace.cpp @@ -0,0 +1,15 @@ +// RUN: clang-cc -fsyntax-only -code-completion-dump=1 %s -o - | FileCheck -check-prefix=CC1 %s && +// RUN: true + +namespace N3 { +} + +namespace N2 { + namespace I1 { } + namespace I4 = I1; + namespace I5 { } + namespace I1 { } + + // CHECK-CC1: I1 : 0 + // CHECK-NEXT-CC1: I5 : 0 + namespace diff --git a/clang/test/CodeCompletion/using-namespace.cpp b/clang/test/CodeCompletion/using-namespace.cpp new file mode 100644 index 00000000000..b30b0bcfac9 --- /dev/null +++ b/clang/test/CodeCompletion/using-namespace.cpp @@ -0,0 +1,24 @@ +// RUN: clang-cc -fsyntax-only -code-completion-dump=1 %s -o - | FileCheck -check-prefix=CC1 %s && +// RUN: true + +namespace N4 { + namespace N3 { } +} + +class N3; + +namespace N2 { + namespace I1 { } + namespace I4 = I1; + namespace I5 { } + namespace I1 { } + + void foo() { + // CHECK-CC1: I1 : 2 + // CHECK-CC1: I4 : 2 + // CHECK-CC1: I5 : 2 + // CHECK-CC1: N2 : 3 + // CHECK-NEXT-CC1: N4 : 3 + using namespace + + diff --git a/clang/test/CodeCompletion/using.cpp b/clang/test/CodeCompletion/using.cpp new file mode 100644 index 00000000000..7bef3534599 --- /dev/null +++ b/clang/test/CodeCompletion/using.cpp @@ -0,0 +1,27 @@ +// RUN: clang-cc -fsyntax-only -code-completion-dump=1 %s -o - | FileCheck -check-prefix=CC1 %s && +// RUN: true + +namespace N4 { + namespace N3 { } +} + +class N3; + +namespace N2 { + namespace I1 { } + namespace I4 = I1; + namespace I5 { } + namespace I1 { } + + void foo() { + int N3; + + // CHECK-CC1: I1 : 2 + // CHECK-CC1: I4 : 2 + // CHECK-CC1: I5 : 2 + // CHECK-CC1: N2 : 3 + // CHECK-CC1: N3 : 3 + // CHECK-NEXT-CC1: N4 : 3 + using + + |