r229146 - PR17938: This has already been fixed, add regression test.
Richard Smith
richard-llvm at metafoo.co.uk
Fri Feb 13 11:49:59 PST 2015
Author: rsmith
Date: Fri Feb 13 13:49:59 2015
New Revision: 229146
URL: http://llvm.org/viewvc/llvm-project?rev=229146&view=rev
Log:
PR17938: This has already been fixed, add regression test.
Modified:
cfe/trunk/test/SemaCXX/constant-expression-cxx11.cpp
Modified: cfe/trunk/test/SemaCXX/constant-expression-cxx11.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/constant-expression-cxx11.cpp?rev=229146&r1=229145&r2=229146&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/constant-expression-cxx11.cpp (original)
+++ cfe/trunk/test/SemaCXX/constant-expression-cxx11.cpp Fri Feb 13 13:49:59 2015
@@ -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());
+}
More information about the cfe-commits
mailing list