llvm-project/clang/test/CXX/expr/expr.const
Richard Smith debad6460b 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
2019-05-12 09:39:08 +00:00
..
p2-0x.cpp Reject attempts to call non-static member functions on objects outside 2019-05-12 09:39:08 +00:00
p3-0x-nowarn.cpp
p3-0x.cpp
p5-0x.cpp
p6.cpp P0859R0: List-initialization is potentially-constant-evaluated and 2018-09-26 04:36:55 +00:00