[PATCH] D46259: [CFLGraph][NFC] Simplify/reorder switch in visitConstantExpr

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 1 14:22:48 PDT 2018


xbolva00 added a comment.

In https://reviews.llvm.org/D46259#1084581, @rjmccall wrote:

> I hate to keep making these picky comments, but I don't know what you're trying to do with the braces now.  You're adding braces on some of these cases, you're removing them from others, it's all inconsistent.  I think it's almost always best to have braces on cases, unless they're just a single-line return or something; so please at least leave the existing braces where they are, and maybe add braces to cases if they don't have them.


Current code has the pattern like "If two addX in the case then use braces, if just one, no braces" so I was not sure. I added them at first and then I removed them just since I thought you would blame me that code doesnt follow original "scheme/pattern".

Sorry, thanks for the advice, I will fix it.


https://reviews.llvm.org/D46259





More information about the llvm-commits mailing list