blob: fb1d74631b2bc4463f3718d01523e202c92dcfb7 [file] [log] [blame]
Hans Wennborg82dd8772014-06-25 22:19:48 +00001// RUN: %clang_cc1 -triple i686-win32 -fms-compatibility -verify -std=c++11 %s
David Majnemerc28a9642014-06-24 05:59:13 +00002
David Majnemer11a54c32014-06-24 06:40:51 +00003extern int __attribute__((dllimport)) var;
4constexpr int *varp = &var; // expected-error {{must be initialized by a constant expression}}
5
6extern __attribute__((dllimport)) void fun();
7constexpr void (*funp)(void) = &fun; // expected-error {{must be initialized by a constant expression}}
David Majnemer0c43d802014-06-25 08:15:07 +00008
9template <void (*)()>
10struct S {};
11S<&fun> x;
12
13template <int *>
14struct U {};
15U<&var> y;