diff options
Diffstat (limited to 'clang/test/SemaCXX/attr-selectany.cpp')
| -rw-r--r-- | clang/test/SemaCXX/attr-selectany.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/attr-selectany.cpp b/clang/test/SemaCXX/attr-selectany.cpp index 0f9776dbf5d..c27a9159215 100644 --- a/clang/test/SemaCXX/attr-selectany.cpp +++ b/clang/test/SemaCXX/attr-selectany.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify %s +// RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify -std=c++11 %s // MSVC produces similar diagnostics. __declspec(selectany) void foo() { } // expected-error{{'selectany' can only be applied to data items with external linkage}} @@ -31,3 +31,6 @@ class X { }; __declspec(selectany) X x(1); + +namespace { class Internal {}; } +__declspec(selectany) auto x8 = Internal(); // expected-error {{'selectany' can only be applied to data items with external linkage}} |

