[PATCH] D81157: Propose naming principle for NodeRole and apply it

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 4 09:53:16 PDT 2020


gribozavr2 added inline comments.


================
Comment at: clang/include/clang/Tooling/Syntax/Nodes.h:124
   IfStatement_thenStatement,
   IfStatement_elseKeyword,
   IfStatement_elseStatement,
----------------
eduucaldas wrote:
> gribozavr2 wrote:
> > Shouldn't `elseKeyword` have no prefix?
> When a keyword can only be used by IfStatement, then I think it actually helps readability to have it prepended with the ParentKind. Here everything is nicely grouped, and if someone needs to change IfStatement, it is clear to see where to make the change.
OK, makes sense.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81157





More information about the cfe-commits mailing list