diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-12-16 19:06:07 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-12-16 19:06:07 +0000 |
commit | 08d6e032a2a0a8656d12b3b7b93942987bb12eb7 (patch) | |
tree | 632b74cc7329419d23c53cb941e19ed16a587d5b /lib/Frontend/Warnings.cpp | |
parent | d3d8548e75f3fb6db53ed0927c1df30d78f4ce1d (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/Frontend/Warnings.cpp')
-rw-r--r-- | lib/Frontend/Warnings.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Frontend/Warnings.cpp b/lib/Frontend/Warnings.cpp index e63bc21cb4..6f441112f3 100644 --- a/lib/Frontend/Warnings.cpp +++ b/lib/Frontend/Warnings.cpp @@ -58,6 +58,8 @@ void clang::ProcessWarningOptions(DiagnosticsEngine &Diags, Diags.setErrorLimit(Opts.ErrorLimit); if (Opts.TemplateBacktraceLimit) Diags.setTemplateBacktraceLimit(Opts.TemplateBacktraceLimit); + if (Opts.ConstexprBacktraceLimit) + Diags.setConstexprBacktraceLimit(Opts.ConstexprBacktraceLimit); // If -pedantic or -pedantic-errors was specified, then we want to map all // extension diagnostics onto WARNING or ERROR unless the user has futz'd |