llvm-project/clang/test/CXX
Richard Smith d05df0ef43 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.

llvm-svn: 360499
2019-05-11 02:00:06 +00:00
..
basic [c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose 2019-05-09 03:31:27 +00:00
class When typo-correcting a function name, consider correcting to a type name 2019-05-09 00:57:24 +00:00
class.access Fix implementation of [temp.local]p4. 2019-02-15 21:53:07 +00:00
class.derived [cxx2a] P0641R2: (Some) type mismatches on defaulted functions only 2018-09-28 01:16:43 +00:00
concepts-ts Remove old concepts parsing code 2017-12-07 00:34:20 +00:00
conv Specify an explicit underlying type for this enum to fix Windows 2018-06-29 20:41:23 +00:00
cpp PR41192: fix cases where "missing ';' after class" error would 2019-04-16 00:47:45 +00:00
dcl.dcl DR1872: don't allow any calls to virtual functions in constant 2019-05-09 19:45:49 +00:00
dcl.decl P1286R2: Remove restriction that the exception specification of a 2019-05-06 05:04:56 +00:00
drs DR1872: don't allow any calls to virtual functions in constant 2019-05-09 19:45:49 +00:00
except P1286R2: Remove restriction that the exception specification of a 2019-05-06 05:04:56 +00:00
expr Reject attempts to call non-static member functions on objects outside 2019-05-11 02:00:06 +00:00
lex [C++20] Implement context-sensitive header-name lexing and pp-import parsing in the preprocessor. 2019-04-11 21:18:23 +00:00
module C++ DR2387: a variable template declared wtih (or instantiated with) a 2019-04-26 01:51:08 +00:00
modules-ts [c++2a] Implement semantic restrictions for 'export' declarations. 2019-04-22 22:50:11 +00:00
over DR1687: When overload resolution selects a built-in operator, implicit 2018-06-27 20:30:34 +00:00
special PR24164, PR39336: init-captures are not distinct full-expressions. 2018-10-19 19:01:34 +00:00
stmt.stmt Refactor the way we handle diagnosing unused expression results. 2019-01-04 16:58:14 +00:00
temp [c++20] Add support for explicit(bool), as described in P0892R2. 2019-05-09 03:59:21 +00:00