]> granicus.if.org Git - clang/commit
Refactor constant evaluation of typeid(T) to track a symbolic type_info
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 17 May 2019 07:06:46 +0000 (07:06 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 17 May 2019 07:06:46 +0000 (07:06 +0000)
commit0d69c680256f145bf35a764b8db7d3f96a57b694
tree67f9409d92d7ddc9a54fdff914a9fc82ecdf134e
parent5af15bd075f9263f3bf3cf75add1d26beb9c48ad
Refactor constant evaluation of typeid(T) to track a symbolic type_info
object rather than tracking the originating expression.

This is groundwork for supporting polymorphic typeid expressions. (Note
that this somewhat regresses our support for DR1968, but it turns out
that that never actually worked anyway, at least in non-trivial cases.)

This reinstates r360974, reverted in r360988, with a fix for a
static_assert failure on 32-bit builds: force Type base class to have
8-byte alignment like the rest of Clang's AST nodes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@360995 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/clang/AST/APValue.h
include/clang/AST/Type.h
include/clang/Basic/DiagnosticASTKinds.td
lib/AST/APValue.cpp
lib/AST/ExprConstant.cpp
lib/CodeGen/CGExprConstant.cpp
lib/Sema/SemaTemplate.cpp
test/CXX/drs/dr19xx.cpp
test/Parser/MicrosoftExtensions.cpp
test/SemaCXX/builtin-constant-p.cpp
test/SemaCXX/typeid.cpp
www/cxx_dr_status.html