[libcxx-commits] [PATCH] D147844: [clang][Sema]Print diagnostic warning about precedence when integer expression is used without parentheses in an conditional operator expression

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 10 14:47:42 PDT 2023


ldionne accepted this revision as: libc++abi.
ldionne added a comment.
This revision is now accepted and ready to land.

Code changes in libc++ and libc++abi LGTM. I am neutral on whether the diagnostic is worth adding, but don't consider libc++ and libc++abi as blockers for this patch.



================
Comment at: libcxxabi/src/cxa_personality.cpp:721
                 // Found a cleanup
-                results.reason = actions & _UA_SEARCH_PHASE
-                                     ? _URC_CONTINUE_UNWIND
-                                     : _URC_HANDLER_FOUND;
+                results.reason = ((actions & _UA_SEARCH_PHASE) ? _URC_CONTINUE_UNWIND : _URC_HANDLER_FOUND);
                 return;
----------------
Double-parens are not required.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147844



More information about the libcxx-commits mailing list