[all-commits] [llvm/llvm-project] c6a05e: [Syntax] Disallow invalid Node operations

Sam McCall via All-commits all-commits at lists.llvm.org
Tue Oct 27 00:36:55 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c6a05eb62f2ab392eba4e7a056e95c821587ae47
      https://github.com/llvm/llvm-project/commit/c6a05eb62f2ab392eba4e7a056e95c821587ae47
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2020-10-27 (Tue, 27 Oct 2020)

  Changed paths:
    M clang/include/clang/Tooling/Syntax/Tree.h

  Log Message:
  -----------
  [Syntax] Disallow invalid Node operations

Copy/move break invariants (move could be fixed).
Node/Tree should have no public constructors, they're abstract.
Destructor is private to enforce arena allocation.

(Making the constructor of all subclasses private doesn't seem worthwhile)

Differential Revision: https://reviews.llvm.org/D90163




More information about the All-commits mailing list