[all-commits] [llvm/llvm-project] 1dc783: [SyntaxTree][Nit] Take `ArrayRef` instead of `std:...

Eduardo Caldas via All-commits all-commits at lists.llvm.org
Mon Sep 21 23:47:59 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1dc7836aed134b4543bad6aa54f15cc0e51a627f
      https://github.com/llvm/llvm-project/commit/1dc7836aed134b4543bad6aa54f15cc0e51a627f
  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

  Log Message:
  -----------
  [SyntaxTree][Nit] Take `ArrayRef` instead of `std::vector` as argument for `createTree`

I also assured that there are no other functions unnecessarily using std::vector as argument.

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


  Commit: af582c9b0f3a09b6a1b5101fd30dcbcef5c188b0
      https://github.com/llvm/llvm-project/commit/af582c9b0f3a09b6a1b5101fd30dcbcef5c188b0
  Author: Eduardo Caldas <ecaldas at google.com>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M clang/lib/Tooling/Syntax/Tree.cpp
    M clang/unittests/Tooling/Syntax/CMakeLists.txt
    A clang/unittests/Tooling/Syntax/TreeTest.cpp

  Log Message:
  -----------
  [SyntaxTree] Test `findFirstLeaf` and `findLastLeaf`

* Introduce `TreeTest.cpp` to unit test `Tree.h`
* Add `generateAllTreesWithShape` to generating test cases
* Add tests for `findFirstLeaf` and `findLastLeaf`
* Fix implementations of `findFirstLeaf` and `findLastLeaf` that had
been broken when empty `Tree` were present.

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


Compare: https://github.com/llvm/llvm-project/compare/bc3615f50e58...af582c9b0f3a


More information about the All-commits mailing list