]> granicus.if.org Git - clang/commit
[ExprConstant] Use an AST node and a version number as a key to create
authorAkira Hatanaka <ahatanaka@apple.com>
Tue, 10 Apr 2018 05:15:01 +0000 (05:15 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Tue, 10 Apr 2018 05:15:01 +0000 (05:15 +0000)
commit96176cafb82cab5ff75d485abbd90d5e10200fe6
treee48047b12c9fcc3de536063676c49ca79bc87675
parent89dbe05bfd0704a71ad1713709bda144a31ac1ef
[ExprConstant] Use an AST node and a version number as a key to create
an APValue and retrieve it from map Temporaries.

The version number is needed when a single AST node is visited multiple
times and is used to create APValues that are required to be distinct
from each other (for example, MaterializeTemporaryExprs in default
arguments and VarDecls in loops).

rdar://problem/36505742

Differential Revision: https://reviews.llvm.org/D42776

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329671 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/APValue.h
lib/AST/APValue.cpp
lib/AST/ExprConstant.cpp
test/SemaCXX/constant-expression-cxx1y.cpp
test/SemaCXX/constexpr-default-arg.cpp [new file with mode: 0644]