[PATCH] D34810: [Sema] -Wcomma should not warn for expressions that return void

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 29 10:53:49 PDT 2017


rnk added a comment.

I thought the intention of -Wcomma was to warn on practically all non-macro uses of the comma operator. I know it's silly to cast void to void, but I seem to recall that this was an intentional style-ish warning like -Wparentheses, which encourages `if ((x = y))` for intentional assignments in ifs.


Repository:
  rL LLVM

https://reviews.llvm.org/D34810





More information about the cfe-commits mailing list