1f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -Wc++11-narrowing -Wmicrosoft -verify -fms-extensions -std=c++11 2f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -Wc++11-narrowing -Wmicrosoft -verify -fms-extensions -std=c++11 -fms-compatibility -DMS_COMPAT 3f4a2713aSLionel Sambuc 4f4a2713aSLionel Sambuc 5f4a2713aSLionel Sambuc struct A { 6f4a2713aSLionel Sambuc unsigned int a; 7f4a2713aSLionel Sambuc }; 8f4a2713aSLionel Sambuc int b = 3; 9*0a6a1f1dSLionel Sambuc A var = { b }; // expected-warning {{ cannot be narrowed }} expected-note {{insert an explicit cast to silence this issue}} 10f4a2713aSLionel Sambuc 11f4a2713aSLionel Sambuc 12f4a2713aSLionel Sambuc namespace PR13433 { 13f4a2713aSLionel Sambuc struct S; 14f4a2713aSLionel Sambuc S make(); 15f4a2713aSLionel Sambuc 16f4a2713aSLionel Sambuc template<typename F> auto x(F f) -> decltype(f(make())); 17f4a2713aSLionel Sambuc #ifndef MS_COMPAT 18f4a2713aSLionel Sambuc // expected-error@-2{{calling 'make' with incomplete return type 'PR13433::S'}} 19f4a2713aSLionel Sambuc // expected-note@-5{{'make' declared here}} 20f4a2713aSLionel Sambuc // expected-note@-7{{forward declaration of 'PR13433::S'}} 21f4a2713aSLionel Sambuc #endif 22f4a2713aSLionel Sambuc } 23