================
@@ -391,16 +397,39 @@ void Sema::DiagnoseUnusedExprResult(const Stmt *S, 
unsigned DiagID) {
   // isn't an array.
   if (E->isGLValue() && E->getType().isVolatileQualified() &&
       !E->getType()->isArrayType()) {
-    Diag(Loc, diag::warn_unused_volatile) << R1 << R2;
+    S.Diag(Loc, diag::warn_unused_volatile) << R1 << R2;
     return;
   }
 
+  // Don't diagnose discarded left of dot in static class member access
+  // because its type is "used" to determine the class to access
+  //if (DiagID == diag::warn_discarded_class_member_access)
+  //  return;
----------------
Sirraide wrote:

I think this can be deleted at this point?

https://github.com/llvm/llvm-project/pull/120223
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to