[PATCH] D113795: Comment Sema: Eliminate or factor out DeclInfo inspection (NFC)

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 17 04:11:23 PST 2021


gribozavr2 added a comment.

Sorry, here I also find the old code to be more readable.

- I don't see a problem with checks that are only used once. They are encapsulated in functions with meaningful names, making the code more readable. Compare `Sema::checkFunctionDeclVerbatimLine` before and after, for example.

- checkDecl looks like a too complex abstraction for the task at hand: it accepts a function pointer (and it is incorrect for the user to call those other functions directly), it hardcodes the result value of `false` when the decl is not available etc.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113795/new/

https://reviews.llvm.org/D113795



More information about the cfe-commits mailing list