2014-06-26 06:19:48 +08:00
|
|
|
// RUN: %clang_cc1 -triple i686-win32 -fms-compatibility -verify -std=c++11 %s
|
2014-06-24 13:59:13 +08:00
|
|
|
|
2014-06-24 14:40:51 +08:00
|
|
|
extern int __attribute__((dllimport)) var;
|
|
|
|
constexpr int *varp = &var; // expected-error {{must be initialized by a constant expression}}
|
|
|
|
|
|
|
|
extern __attribute__((dllimport)) void fun();
|
|
|
|
constexpr void (*funp)(void) = &fun; // expected-error {{must be initialized by a constant expression}}
|
2014-06-25 16:15:07 +08:00
|
|
|
|
|
|
|
template <void (*)()>
|
|
|
|
struct S {};
|
|
|
|
S<&fun> x;
|
|
|
|
|
|
|
|
template <int *>
|
|
|
|
struct U {};
|
|
|
|
U<&var> y;
|