]> granicus.if.org Git - clang/commit
Implement DR1454. This allows all intermediate results in constant expressions
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 15 Feb 2012 02:18:13 +0000 (02:18 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 15 Feb 2012 02:18:13 +0000 (02:18 +0000)
commit83587db1bda97f45d2b5a4189e584e2a18be511a
treece60b67476bb535994126ecd8ff1ba2a85f00000
parent1d6cc6a44182ef03a373ecd61505042eca3af906
Implement DR1454. This allows all intermediate results in constant expressions
to be core constant expressions (including pointers and references to
temporaries), and makes constexpr calculations Turing-complete. A Turing machine
simulator is included as a testcase.

This opens up the possibilty of removing CCValue entirely, and removing some
copies from the constant evaluator in the process, but that cleanup is not part
of this change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150557 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/APValue.h
include/clang/Basic/DiagnosticASTKinds.td
lib/AST/APValue.cpp
lib/AST/ExprConstant.cpp
test/CXX/expr/expr.const/p2-0x.cpp
test/SemaCXX/constant-expression-cxx11.cpp
test/SemaCXX/constexpr-turing.cpp [new file with mode: 0644]