mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-30 04:16:08 +00:00

expressions to have complete return types (or accessible destructors). If the return type is required to be complete for some other reason (for instance, if it is needed by overload resolution), then it will still be required to be complete. This is apparently required in order to parse a MSVC11 header. llvm-svn: 160924
23 lines
729 B
C++
23 lines
729 B
C++
// RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -Wc++11-narrowing -Wmicrosoft -verify -fms-extensions -std=c++11
|
|
// RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -Wc++11-narrowing -Wmicrosoft -verify -fms-extensions -std=c++11 -fms-compatibility -DMS_COMPAT
|
|
|
|
|
|
struct A {
|
|
unsigned int a;
|
|
};
|
|
int b = 3;
|
|
A var = { b }; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
|
|
|
|
|
|
namespace PR13433 {
|
|
struct S;
|
|
S make();
|
|
|
|
template<typename F> auto x(F f) -> decltype(f(make()));
|
|
#ifndef MS_COMPAT
|
|
// expected-error@-2{{calling 'make' with incomplete return type 'PR13433::S'}}
|
|
// expected-note@-5{{'make' declared here}}
|
|
// expected-note@-7{{forward declaration of 'PR13433::S'}}
|
|
#endif
|
|
}
|