// RUN: %clang_cc1 -std=c++14 %s -verify -fms-extensions -triple x86_64-windows-msvc
// RUN: %clang_cc1 -std=c++17 %s -verify -fms-extensions -triple x86_64-windows-msvc
__declspec void ;
__declspec int imported_int;
;
// Instantiation is OK.
;
;
void
// Check variable template instantiation.
;
;
int
// Member pointer instantiation.
;
TemplateMemPtr<&Foo::imported_method> instantiate_mp;
// constexpr initialization doesn't work for dllimport things.
// expected-error@+1{{must be initialized by a constant expression}}
constexpr void = &imported_func;
// expected-error@+1{{must be initialized by a constant expression}}
constexpr int *constexpr_import_int = &imported_int;
// expected-error@+1{{must be initialized by a constant expression}}
constexpr void = &Foo::imported_method;
// We make dynamic initializers for 'const' globals, but not constexpr ones.
void = &imported_func;
int *const const_import_int = &imported_int;
void = &Foo::imported_method;
// Check that using a non-type template parameter for constexpr global
// initialization is correctly diagnosed during template instantiation.
;
void