constexpr: converted constant expression handling for enumerator values, case
values and non-type template arguments of integral and enumeration types.
This change causes some legal C++98 code to no longer compile in C++11 mode, by
enforcing the C++11 rule that narrowing integral conversions are not permitted
in the final implicit conversion sequence for the above cases.
llvm-svn: 148439
diff --git a/clang/test/SemaCXX/constant-expression-cxx11.cpp b/clang/test/SemaCXX/constant-expression-cxx11.cpp
index 5ccb398..e1b3781 100644
--- a/clang/test/SemaCXX/constant-expression-cxx11.cpp
+++ b/clang/test/SemaCXX/constant-expression-cxx11.cpp
@@ -92,9 +92,8 @@
namespace CaseStatements {
void f(int n) {
switch (n) {
- // FIXME: Produce the 'add ()' fixit for this.
- case MemberZero().zero: // desired-error {{did you mean to call it with no arguments?}} expected-error {{not an integral constant expression}} expected-note {{non-literal type '<bound member function type>'}}
- case id(1):
+ case MemberZero().zero: // expected-error {{did you mean to call it with no arguments?}} expected-note {{previous}}
+ case id(0): // expected-error {{duplicate case value '0'}}
return;
}
}