[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 13 13:35:58 PDT 2024
================
@@ -9182,6 +9182,9 @@ def warn_unused_constructor : Warning<
def warn_unused_constructor_msg : Warning<
"ignoring temporary created by a constructor declared with %0 attribute: %1">,
InGroup<UnusedValue>;
+def warn_discarded_class_member_access : Warning<
+ "left operand of dot in this class member access is discarded and has no effect">,
----------------
Sirraide wrote:
```suggestion
"discarding left operand of '.' in %select{access to static data member|access to enumerator|call to static member function}0">,
```
(and maybe more cases if I missed any)
https://github.com/llvm/llvm-project/pull/95112
More information about the cfe-commits
mailing list