llvm-project/clang/test/CXX/basic
Richard Smith 24cdcadcc5 C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue conversion applied to a member access or similar not-quite-trivial lvalue expression.
Summary:
When a variable is named in a context where we can't directly emit a
reference to it (because we don't know for sure that it's going to be
defined, or it's from an enclosing function and not captured, or the
reference might not "work" for some reason), we emit a copy of the
variable as a global and use that for the known-to-be-read-only access.

This reinstates r363295, reverted in r363352, with a fix for PR42276:
we now produce a proper name for a non-odr-use reference to a static
constexpr data member. The name <mangled-name>.const is used in that
case; such names are reserved to the implementation for cases such as
this and should demangle nicely.

Reviewers: rjmccall

Subscribers: jdoerfert, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D63157

llvm-svn: 363428
2019-06-14 17:46:37 +00:00
..
basic.def
basic.def.odr C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue conversion applied to a member access or similar not-quite-trivial lvalue expression. 2019-06-14 17:46:37 +00:00
basic.link [c++2a] Add semantic support for private module fragments. 2019-04-18 21:12:54 +00:00
basic.lookup [c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose 2019-05-09 03:31:27 +00:00
basic.scope [c++2a] Improve diagnostic for use of declaration from another TU's 2019-04-18 00:56:58 +00:00
basic.start
basic.stc/basic.stc.dynamic
basic.types