summaryrefslogtreecommitdiff
path: root/test/SemaCXX/attr-selectany.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/attr-selectany.cpp')
-rw-r--r--test/SemaCXX/attr-selectany.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/SemaCXX/attr-selectany.cpp b/test/SemaCXX/attr-selectany.cpp
index 058f2fcb84ab7..9dc14b3c38184 100644
--- a/test/SemaCXX/attr-selectany.cpp
+++ b/test/SemaCXX/attr-selectany.cpp
@@ -39,7 +39,9 @@ __declspec(selectany) auto x8 = Internal(); // expected-error {{'selectany' can
// The D3D11 headers do something like this. MSVC doesn't error on this at
// all, even without the __declspec(selectany), in violation of the standard.
// We fall back to a warning for selectany to accept headers.
-struct SomeStruct {};
+struct SomeStruct {
+ int foo;
+};
extern const __declspec(selectany) SomeStruct some_struct; // expected-warning {{default initialization of an object of const type 'const SomeStruct' without a user-provided default constructor is a Microsoft extension}}
// It should be possible to redeclare variables that were defined