[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / SemaCXX / microsoft-cxx0x.cpp
blobcfb88c0317c3a2b4904d7c789989b7e2cdc55fb9
1 // RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -Wc++11-narrowing -Wmicrosoft -verify -fms-extensions -std=c++11
2 // RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -Wc++11-narrowing -Wmicrosoft -verify -fms-extensions -std=c++11 -fms-compatibility -DMS_COMPAT
5 struct A {
6 unsigned int a;
7 };
8 int b = 3;
9 A var = { b }; // expected-warning {{ cannot be narrowed }} expected-note {{insert an explicit cast to silence this issue}}
12 namespace PR13433 {
13 struct S;
14 S make();
16 template<typename F> auto x(F f) -> decltype(f(make()));
17 #ifndef MS_COMPAT
18 // expected-error@-2{{calling 'make' with incomplete return type 'S'}}
19 // expected-note@-5{{'make' declared here}}
20 // expected-note@-7{{forward declaration of 'PR13433::S'}}
21 #endif