]> granicus.if.org Git - clang/commit
C++11 constexpr: Add note stacks containing backtraces if constant evaluation
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 16 Dec 2011 19:06:07 +0000 (19:06 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 16 Dec 2011 19:06:07 +0000 (19:06 +0000)
commit08d6e032a2a0a8656d12b3b7b93942987bb12eb7
tree632b74cc7329419d23c53cb941e19ed16a587d5b
parentd3d8548e75f3fb6db53ed0927c1df30d78f4ce1d
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
21 files changed:
include/clang/AST/APValue.h
include/clang/Basic/Diagnostic.h
include/clang/Basic/DiagnosticASTKinds.td
include/clang/Driver/CC1Options.td
include/clang/Driver/Options.td
include/clang/Frontend/DiagnosticOptions.h
lib/AST/APValue.cpp
lib/AST/ExprConstant.cpp
lib/Basic/Diagnostic.cpp
lib/Driver/Tools.cpp
lib/Frontend/CompilerInvocation.cpp
lib/Frontend/Warnings.cpp
lib/Sema/SemaInit.cpp
test/CXX/expr/expr.const/p2-0x.cpp
test/SemaCXX/constant-expression-cxx11.cpp
test/SemaCXX/constexpr-backtrace-limit.cpp [new file with mode: 0644]
test/SemaCXX/constexpr-printing.cpp [new file with mode: 0644]
unittests/AST/APValueTest.cpp [deleted file]
unittests/AST/Makefile [deleted file]
unittests/CMakeLists.txt
unittests/Makefile