brintos

brintos / llvm-project-archived public Read only

0
0
Text · 501 B · cbbe2fe Raw
17 lines · cpp
1// RUN: %clang_cc1 -triple i686-win32 -verify -std=c++11 %s2// RUN: %clang_cc1 -triple i686-mingw32 -verify -std=c++11 %s3 4extern 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}}9 10template <void (*)()>11struct S {};12S<&fun> x;13 14template <int *>15struct U {};16U<&var> y;17