summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/Core/index-source.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2017-05-22 14:39:39 +0000
committerAlex Lorenz <arphaman@gmail.com>2017-05-22 14:39:39 +0000
commitd65b3e4212588224f49a8be2ea2f0aac180dfc94 (patch)
tree6f22a38b3d765e489b94ecacc0cf29db9880178c /clang/test/Index/Core/index-source.cpp
parentf2dc6492edd47621a14622023e08a661dcd9640c (diff)
downloadbcm5719-llvm-d65b3e4212588224f49a8be2ea2f0aac180dfc94.tar.gz
bcm5719-llvm-d65b3e4212588224f49a8be2ea2f0aac180dfc94.zip
[index] 'using namespace' declarations in functions should record
the reference to the namespace rdar://32323190 llvm-svn: 303555
Diffstat (limited to 'clang/test/Index/Core/index-source.cpp')
-rw-r--r--clang/test/Index/Core/index-source.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Index/Core/index-source.cpp b/clang/test/Index/Core/index-source.cpp
index 9248e86ff69..a8f3aa49f9c 100644
--- a/clang/test/Index/Core/index-source.cpp
+++ b/clang/test/Index/Core/index-source.cpp
@@ -339,3 +339,14 @@ void ::ns::inner::func() {
// CHECK: [[@LINE-1]]:3 | namespace/C++ | ns | c:@N@ns | <no-cgname> | Ref,RelCont | rel: 1
// CHECK: [[@LINE-2]]:7 | namespace-alias/C++ | innerAlias | c:@N@ns@NA@innerAlias | <no-cgname> | Ref,RelCont | rel: 1
}
+
+void innerUsingNamespace() {
+ using namespace ns;
+// CHECK: [[@LINE-1]]:19 | namespace/C++ | ns | c:@N@ns | <no-cgname> | Ref,RelCont | rel: 1
+ {
+ using namespace ns::innerAlias;
+// CHECK: [[@LINE-1]]:25 | namespace-alias/C++ | innerAlias | c:@N@ns@NA@innerAlias | <no-cgname> | Ref,RelCont | rel: 1
+// CHECK: [[@LINE-2]]:21 | namespace/C++ | ns | c:@N@ns | <no-cgname> | Ref,RelCont | rel: 1
+// CHECK-NOT: [[@LINE-3]]:21
+ }
+}
OpenPOWER on IntegriCloud