summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/namespace-alias.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-12-03 23:24:04 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-12-03 23:24:04 +0000
commit2b2a17675243c6f9283d353984d882792805803f (patch)
tree13b75e4bd97fcacbf9034629bc97b9e4005d41ae /clang/test/SemaCXX/namespace-alias.cpp
parent391a98afd54acf7205b726196eb646e2d91963d4 (diff)
downloadbcm5719-llvm-2b2a17675243c6f9283d353984d882792805803f.tar.gz
bcm5719-llvm-2b2a17675243c6f9283d353984d882792805803f.zip
PR25731: namespace alias declarations can appear at block scope; ensure that we
do scope-based lookup when looking for redeclarations of them. Add some related missing checks for the scope-based redeclaration lookup: properly filter the list of found declarations to match the scope, and diagnose shadowing of a template parameter name. llvm-svn: 254663
Diffstat (limited to 'clang/test/SemaCXX/namespace-alias.cpp')
-rw-r--r--clang/test/SemaCXX/namespace-alias.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/namespace-alias.cpp b/clang/test/SemaCXX/namespace-alias.cpp
index 63615ecbd35..1cf820e3e38 100644
--- a/clang/test/SemaCXX/namespace-alias.cpp
+++ b/clang/test/SemaCXX/namespace-alias.cpp
@@ -125,3 +125,11 @@ namespace PR7014 {
namespace Y = X::Y;
}
+
+namespace PR25731 {
+ void f() {
+ namespace X = PR25731;
+ namespace X = PR25731;
+ X::f();
+ }
+}
OpenPOWER on IntegriCloud