================
@@ -3072,13 +3066,13 @@ namespace conditional_operator_control_flow {
 #ifdef __cpp_exceptions
 
 void throw_branches(bool cond, int *value) {
-  (void)(cond ? throw 1 : value);
+  use((cond ? throw 1 : value));
   (void)(cond ? throw 1 : throw 2);
 }
 
 void nested_throw_branches(bool cond, bool cond2, int *value) {
-  (void)(cond ? (cond2 ? throw 1 : value) : throw 2);
-  (void)(cond ? throw 1 : (cond2 ? value : throw 2));
+  use((cond ? (cond2 ? throw 1 : value) : throw 2));
+  use((cond ? throw 1 : (cond2 ? value : throw 2)));
----------------
usx95 wrote:

super nit: remove the extra brackets. Also migrate `(void)(cond ? throw 1 : 
throw 2);` away from `void`.

https://github.com/llvm/llvm-project/pull/225799
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to