1 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -fms-extensions -verify %s 2 // RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -fsyntax-only -fms-extensions -verify %s -DMSVC 3 4 // Export const variable initialization. 5 6 #ifdef MSVC 7 // expected-no-diagnostics 8 #endif 9 10 #ifndef MSVC 11 // expected-warning@+2 {{__declspec attribute 'dllexport' is not supported}} 12 #endif 13 __declspec(dllexport) int const x = 3; 14 15 namespace { 16 namespace named { 17 #ifndef MSVC 18 // expected-warning@+2 {{__declspec attribute 'dllexport' is not supported}} 19 #endif 20 __declspec(dllexport) int const x = 3; 21 } 22 } // namespace 23 24 namespace named1 { 25 namespace { 26 namespace named { 27 #ifndef MSVC 28 // expected-warning@+2 {{__declspec attribute 'dllexport' is not supported}} 29 #endif 30 __declspec(dllexport) int const x = 3; 31 } 32 } // namespace 33 } // namespace named1 34