Add note to help explain why a tag such as 'struct' is needed to refer
to a given type, when the reason is that there is a non-type decl with
the same name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155677 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/cxx-using-declaration.cpp b/test/Parser/cxx-using-declaration.cpp
index 2b2a69d..8c60b9b 100644
--- a/test/Parser/cxx-using-declaration.cpp
+++ b/test/Parser/cxx-using-declaration.cpp
@@ -43,3 +43,19 @@
// Should have some errors here. Waiting for implementation.
void X(int);
struct X *x;
+
+
+namespace ShadowedTagNotes {
+
+namespace foo {
+ class Bar {};
+}
+
+void Bar(int); // expected-note{{non-type 'Bar' shadowing class 'Bar' declared here}}
+using foo::Bar;
+
+void ambiguity() {
+ const Bar *x; // expected-error{{must use 'class' tag to refer to type 'Bar' in this scope}}
+}
+
+} // namespace ShadowedTagNotes