forked from OSchip/llvm-project
PR17938: This has already been fixed, add regression test.
llvm-svn: 229146
This commit is contained in:
parent
ec216500f2
commit
46598206b5
|
@ -1984,3 +1984,13 @@ struct InvalidRedef {
|
|||
int f; // expected-note{{previous definition is here}}
|
||||
constexpr int f(void); // expected-error{{redefinition of 'f'}} expected-warning{{will not be implicitly 'const'}}
|
||||
};
|
||||
|
||||
namespace PR17938 {
|
||||
template <typename T> constexpr T const &f(T const &x) { return x; }
|
||||
|
||||
struct X {};
|
||||
struct Y : X {};
|
||||
struct Z : Y { constexpr Z() {} };
|
||||
|
||||
static constexpr auto z = f(Z());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue