aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-12-16 19:06:07 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-12-16 19:06:07 +0000
commit08d6e032a2a0a8656d12b3b7b93942987bb12eb7 (patch)
tree632b74cc7329419d23c53cb941e19ed16a587d5b /lib/Sema/SemaInit.cpp
parentd3d8548e75f3fb6db53ed0927c1df30d78f4ce1d (diff)
C++11 constexpr: Add note stacks containing backtraces if constant evaluation
fails within a call to a constexpr function. Add -fconstexpr-backtrace-limit argument to driver and frontend, to control the maximum number of notes so produced (default 10). Fix APValue printing to be able to pretty-print all APValue types, and move the testing for this functionality from a unittest to a -verify test now that it's visible in clang's output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146749 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 a95a257131..7dbf830431 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -5707,7 +5707,7 @@ static void DiagnoseNarrowingInInitList(
? diag::err_init_list_constant_narrowing
: diag::warn_init_list_constant_narrowing)
<< InitE->getSourceRange()
- << ConstantValue
+ << ConstantValue.getAsString(S.getASTContext(), EntityType)
<< EntityType.getLocalUnqualifiedType();
} else
S.Diag(InitE->getLocStart(),