blob: cbbe2fe9af164187af4d424c2d1f21e97abfa6b1 [file] [log] [blame]
David Majnemer07910d62014-06-26 07:48:46 +00001// RUN: %clang_cc1 -triple i686-win32 -verify -std=c++11 %s
2// RUN: %clang_cc1 -triple i686-mingw32 -verify -std=c++11 %s
David Majnemerc28a9642014-06-24 05:59:13 +00003
David Majnemer11a54c32014-06-24 06:40:51 +00004extern int __attribute__((dllimport)) var;
5constexpr int *varp = &var; // expected-error {{must be initialized by a constant expression}}
6
7extern __attribute__((dllimport)) void fun();
8constexpr void (*funp)(void) = &fun; // expected-error {{must be initialized by a constant expression}}
David Majnemer0c43d802014-06-25 08:15:07 +00009
10template <void (*)()>
11struct S {};
12S<&fun> x;
13
14template <int *>
15struct U {};
16U<&var> y;