Fix handling of objects under construction during constant expression
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sun, 12 May 2019 08:57:59 +0000 (08:57 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sun, 12 May 2019 08:57:59 +0000 (08:57 +0000)
commitd3d6f4f65c77344ccf57f0ae9bea45d8c664ae0f
tree32d1efa4eb05a3ebcb8c3e987cf4d31910f4b300
parent91ab86fd29be1a2e0201cf214f8aaf3f24fafd8b
Fix handling of objects under construction during constant expression
evaluation.

It's not enough to just track the LValueBase that we're evaluating, we
need to also track the path to the objects whose constructors are
running.

This reinstates r360464 (reverted in r360531) with a workaround for an
MSVC bug that previously caused the Windows bots to fail.

llvm-svn: 360537
clang/include/clang/AST/APValue.h
clang/include/clang/AST/Redeclarable.h
clang/include/clang/Basic/DiagnosticASTKinds.td
clang/lib/AST/APValue.cpp
clang/lib/AST/ExprConstant.cpp
clang/test/SemaCXX/constant-expression-cxx1y.cpp