aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-01-18 23:55:52 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-01-18 23:55:52 +0000
commit8ef7b203332b0c8d65876a1f5e6d1db4e6f40e4b (patch)
treedee9b186a48a66f3c8be5c56c4e774338408bece /lib/Sema/SemaInit.cpp
parentd6c7c67313634b317a0d63c32be0511a121bb33d (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148439 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r--lib/Sema/SemaInit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index bd9701ef37..f4f2663bc8 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -5807,7 +5807,7 @@ static void DiagnoseNarrowingInInitList(Sema &S, InitializationSequence &Seq,
// C++11 [dcl.init.list]p7: Check whether this is a narrowing conversion.
APValue ConstantValue;
- switch (SCS->isNarrowing(S.Context, PostInit, ConstantValue)) {
+ switch (SCS->getNarrowingKind(S.Context, PostInit, ConstantValue)) {
case NK_Not_Narrowing:
// No narrowing occurred.
return;