[PATCH] Refactor: Simplify boolean expressions in lib/Parse

Richard Smith richard at metafoo.co.uk
Mon Mar 23 14:14:52 PDT 2015


I agree with John; we have three cases here:

- do we require a name? if so, it's a grouping paren
- do we have a (possibly empty) list of parameters? if so, it's not a grouping paren
- otherwise, it's a grouping paren

It doesn't make sense to combine the second and third cases together. If this code needs clarifying, one way to do it would be to factor out the second check into an appropriately-named function.


http://reviews.llvm.org/D8530

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list