[PATCH] Refactor: Simplify boolean expressions in lib/AST
John McCall
rjmccall at gmail.com
Mon Mar 23 22:29:37 PDT 2015
Much like the Parser patch, I don't think these changes are actually an improvement. In both cases, we have a long series of clauses, each of which returns true or false. The motivation for the patch appears to be purely that it's logically equivalent to directly return the last condition. So what? It doesn't make the code any more readable. It jumbles the last comment. It makes the last clause visually inconsistent with the earlier clauses. It makes it more awkward to adjust or reorder clauses. Why would we want to do this? There has to be some reason beyond "a lint tool told us we could simplify it this way".
http://reviews.llvm.org/D8532
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list