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

2017-07-03 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman abandoned this revision. arphaman added a comment. Abandoning. The current behaviour makes sense. Thanks for the responses! Repository: rL LLVM https://reviews.llvm.org/D34810 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2017-06-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Ah, I see, so this is more of a stylistic warning rather than "suspicious" use one. In https://reviews.llvm.org/D34810#795926, @rtrieu wrote: > What is the reason to exclude void expressions now? For the function case, > it is more consistent to warn on all

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

2017-06-29 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu added a comment. Reid is correct, the whitelisted expressions was greatly reduced during code review so only casts to void would disable the warning. While the last review did not have the description updated to reflect this, the committed code does have an accurate description. What

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

2017-06-29 Thread Greg Parker via Phabricator via cfe-commits
gparker42 added a comment. I thought void-returning functions were supposed to be allowed based on the description in https://reviews.llvm.org/D3976 , but later in that discussion the definition was changed to instead allow almost nothing. Repository: rL LLVM

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

2017-06-29 Thread Reid Kleckner via Phabricator via cfe-commits
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