diff options
author | cor3ntin <corentinjabot@gmail.com> | 2024-12-18 10:44:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-18 10:44:42 +0100 |
commit | db93ef14aef9c572e02bc842762bc4d0278148f9 (patch) | |
tree | 079fa17b0bc8869f1e0613d179dbbef94e58edd7 /llvm/tools/llvm-cov/SourceCoverageViewText.cpp | |
parent | 66bdbfbaa08fa3d8e64a7fe136a8fb717f5cdbb7 (diff) | |
download | llvm-db93ef14aef9c572e02bc842762bc4d0278148f9.zip llvm-db93ef14aef9c572e02bc842762bc4d0278148f9.tar.gz llvm-db93ef14aef9c572e02bc842762bc4d0278148f9.tar.bz2 |
[Clang] Implement CWG2813: Class member access with prvalues (#120223)
This is a rebase of #95112 with my own feedback apply as @MitalAshok has
been inactive for a while.
It's fairly important this makes clang 20 as it is a blocker for #107451
---
[CWG2813](https://cplusplus.github.io/CWG/issues/2813.html)
prvalue.member_fn(expression-list) now will not materialize a temporary
for prvalue if member_fn is an explicit object member function, and
prvalue will bind directly to the object parameter.
The E1 in E1.static_member is now a discarded-value expression, so if E1
was a call to a [[nodiscard]] function, there will now be a warning.
This also affects C++98 with [[gnu::warn_unused_result]] functions.
This should not affect C where TemporaryMaterializationConversion is a
no-op.
Closes #100314
Fixes #100341
---------
Co-authored-by: Mital Ashok <mital@mitalashok.co.uk>
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageViewText.cpp')
0 files changed, 0 insertions, 0 deletions