[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 14 16:17:43 PDT 2019


nickdesaulniers added inline comments.


================
Comment at: clang/test/Sema/warn-binary-conditional-expression-unused.c:8
+    a ? : ++b;
+    a ? a : ++b;
+    ++a ? : b; //expected-warning{{expression result unused}}
----------------
Note to other reviewers:

Whether or not we should warn on `a` here is another story and orthogonal to this patch, which focuses on just fixing existing inconsistency between ternary and gnu binary conditional that exists today.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63369





More information about the cfe-commits mailing list