eduucaldas added a reviewer: gribozavr2.
eduucaldas added a comment.

It's worth noting that accessors in the base APIs don't follow this rule. 
Should we refactor them as well? In this patch?
Examples:

  class Arena {
  public:
    const SourceManager &sourceManager() const { return SourceMgr; }
    const LangOptions &langOptions() const { return LangOpts; }
    const TokenBuffer &tokenBuffer() const;
    std::pair<FileID, ArrayRef<Token>>
    lexBuffer(std::unique_ptr<llvm::MemoryBuffer> Buffer);

  class Node {
  public:
    NodeKind kind() const { return static_cast<NodeKind>(Kind); }
    NodeRole role() const { return static_cast<NodeRole>(Role); }
    Tree *parent() { return Parent; }
    Node *nextSibling() { return NextSibling; }



  class Leaf final : public Node {
  public:
    const Token *token() const { return Tok; }
  };

  class Tree : public Node {
  public:
    Node *firstChild() { return FirstChild; }
    Leaf *firstLeaf();
    Leaf *lastLeaf();


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86679

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to