[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:59 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:

>From what I can tell, the call to the `MakeDiscardedValue()` lambda that you’ve added could take the integer for the `%select` here as a parameter.

https://github.com/llvm/llvm-project/pull/95112


More information about the cfe-commits mailing list