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