summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/MicrosoftCompatibility.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-01-18 00:59:32 +0000
committerAlp Toker <alp@nuanti.com>2014-01-18 00:59:32 +0000
commit0abb05771500eee8c6e39f4f4646a8de8403c491 (patch)
tree27e8f7c3583707917b1f4880f34445c3685ef2e1 /clang/test/SemaCXX/MicrosoftCompatibility.cpp
parent8d7a6f289866e1c1c04005ae3cbdc052c342488e (diff)
downloadbcm5719-llvm-0abb05771500eee8c6e39f4f4646a8de8403c491.tar.gz
bcm5719-llvm-0abb05771500eee8c6e39f4f4646a8de8403c491.zip
Restrict redeclaration of tags introduced by using decls to MSVCCompat
This limits the facility added in r199490 while we seek clarification on the standard. llvm-svn: 199531
Diffstat (limited to 'clang/test/SemaCXX/MicrosoftCompatibility.cpp')
-rw-r--r--clang/test/SemaCXX/MicrosoftCompatibility.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/MicrosoftCompatibility.cpp b/clang/test/SemaCXX/MicrosoftCompatibility.cpp
index 1f27deb0ee1..0971646e73b 100644
--- a/clang/test/SemaCXX/MicrosoftCompatibility.cpp
+++ b/clang/test/SemaCXX/MicrosoftCompatibility.cpp
@@ -120,6 +120,27 @@ private:
}
+namespace using_tag_redeclaration
+{
+ struct S;
+ namespace N {
+ using ::using_tag_redeclaration::S;
+ struct S {}; // expected-note {{previous definition is here}}
+ }
+ void f() {
+ N::S s1;
+ S s2;
+ }
+ void g() {
+ struct S; // expected-note {{forward declaration of 'S'}}
+ S s3; // expected-error {{variable has incomplete type 'S'}}
+ }
+ void h() {
+ using ::using_tag_redeclaration::S;
+ struct S {}; // expected-error {{redefinition of 'S'}}
+ }
+}
+
namespace MissingTypename {
OpenPOWER on IntegriCloud