diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-05-12 09:39:08 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-05-12 09:39:08 +0000 |
commit | debad6460b63ff2269cca859751a053a9e29d6d4 (patch) | |
tree | 0834729ab8d7cc80babc9e38507d344be2fda41e /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | d3d6f4f65c77344ccf57f0ae9bea45d8c664ae0f (diff) | |
download | bcm5719-llvm-debad6460b63ff2269cca859751a053a9e29d6d4.tar.gz bcm5719-llvm-debad6460b63ff2269cca859751a053a9e29d6d4.zip |
Reject attempts to call non-static member functions on objects outside
their lifetime in constant expressions.
This is undefined behavior per [class.cdtor]p2.
We continue to allow this for objects whose values are not visible
within the constant evaluation, because there's no way we can tell
whether the access is defined or not, existing code relies on the
ability to make such calls, and every other compiler allows such
calls.
This reinstates r360499, reverted in r360531.
llvm-svn: 360538
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions