[PATCH] D103938: Diagnose -Wunused-value in constant evaluation context

Yuanfang Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 17 22:24:15 PDT 2021


ychen added a comment.

Thanks for the review.



================
Comment at: clang/test/Sema/exprs.c:19
   if (0) {
-    0 / (0 ? 1 : 0); // expected-warning {{expression result unused}}
   }
----------------
ychen wrote:
> aaron.ballman wrote:
> > Why did we lose this diagnostic (and the above comment about not changing the test)?
> Because the behavior change here is that only reachable code is diagnosed. I should have kept the comment. 
I've put it back.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103938/new/

https://reviews.llvm.org/D103938



More information about the cfe-commits mailing list