[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / CXX / expr / expr.post / expr.static.cast / p9-0x.cpp
blobc624c7e3f2f980299708b374217e885613ce42c5
1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
2 // expected-no-diagnostics
4 enum class EC { ec1 };
6 void test0(EC ec) {
7 (void)static_cast<bool>(ec);
8 (void)static_cast<bool>(EC::ec1);
9 (void)static_cast<char>(ec);
10 (void)static_cast<char>(EC::ec1);
11 (void)static_cast<int>(ec);
12 (void)static_cast<int>(EC::ec1);
13 (void)static_cast<unsigned long>(ec);
14 (void)static_cast<unsigned long>(EC::ec1);
15 (void)static_cast<float>(ec);
16 (void)static_cast<float>(EC::ec1);
17 (void)static_cast<double>(ec);
18 (void)static_cast<double>(EC::ec1);
21 namespace PR9107 {
22 enum E {};
23 template <class _Tp> inline _Tp* addressof(_Tp& __x) {
24 return (_Tp*)&(char&)__x;
26 void test() {
27 E a;
28 addressof(a);