blob: 4596e5a459e4b5bf7b5630089e274241447f6dbd [file] [log] [blame]
David Majnemerc28a9642014-06-24 05:59:13 +00001// RUN: %clang_cc1 -triple i686-win32 -verify -std=c++11 %s
2
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;