[all-commits] [llvm/llvm-project] 161882: [clang][Syntax] syntax::Arena doesnt own TokenBuffer

kadir çetinkaya via All-commits all-commits at lists.llvm.org
Fri Jul 31 02:50:46 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 161882816540fc011554e4a820ab896278491b6a
      https://github.com/llvm/llvm-project/commit/161882816540fc011554e4a820ab896278491b6a
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2020-07-31 (Fri, 31 Jul 2020)

  Changed paths:
    M clang/include/clang/Tooling/Syntax/Tree.h
    M clang/lib/Tooling/Syntax/Tree.cpp
    M clang/unittests/Tooling/Syntax/TreeTest.cpp

  Log Message:
  -----------
  [clang][Syntax] syntax::Arena doesnt own TokenBuffer

Currently an Arena can only be built while consuming a TokenBuffer,
some users (like clangd) might want to share a TokenBuffer with multiple
compenents. This patch changes Arena's TokenBuffer member to be a reference so
that it can be created with read-only token buffers.

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




More information about the All-commits mailing list