[all-commits] [llvm/llvm-project] 66bcb1: [SyntaxTree][Synthesis] Fix: `deepCopy` -> `deepCo...

Eduardo Caldas via All-commits all-commits at lists.llvm.org
Tue Sep 22 02:15:59 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 66bcb14312a08b5d7e1197d23d748b2e23c4d852
      https://github.com/llvm/llvm-project/commit/66bcb14312a08b5d7e1197d23d748b2e23c4d852
  Author: Eduardo Caldas <ecaldas at google.com>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M clang/include/clang/Tooling/Syntax/BuildTree.h
    M clang/lib/Tooling/Syntax/Synthesis.cpp
    M clang/unittests/Tooling/Syntax/SynthesisTest.cpp
    M clang/unittests/Tooling/Syntax/TreeTest.cpp

  Log Message:
  -----------
  [SyntaxTree][Synthesis] Fix: `deepCopy` -> `deepCopyExpandingMacros`.

There can be Macros that are tagged with `modifiable`. Thus verifying
`canModifyAllDescendants` is not sufficient to avoid macros when deep
copying.

We think the `TokenBuffer` could inform us whether a `Token` comes from
a macro. We'll look into that when we can surface this information
easily, for instance in unit tests for `ComputeReplacements`.

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




More information about the All-commits mailing list