[PATCH] D88024: [SyntaxTree][Nit] Take `ArrayRef` instead of `std::vector` as argument for `createTree`

Eduardo Caldas via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 21 23:48:04 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG1dc7836aed13: [SyntaxTree][Nit] Take `ArrayRef` instead of `std::vector` as argument for… (authored by eduucaldas).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88024

Files:
  clang/include/clang/Tooling/Syntax/BuildTree.h
  clang/lib/Tooling/Syntax/Synthesis.cpp


Index: clang/lib/Tooling/Syntax/Synthesis.cpp
===================================================================
--- clang/lib/Tooling/Syntax/Synthesis.cpp
+++ clang/lib/Tooling/Syntax/Synthesis.cpp
@@ -190,7 +190,7 @@
 
 syntax::Tree *clang::syntax::createTree(
     syntax::Arena &A,
-    std::vector<std::pair<syntax::Node *, syntax::NodeRole>> Children,
+    ArrayRef<std::pair<syntax::Node *, syntax::NodeRole>> Children,
     syntax::NodeKind K) {
   auto *T = allocateTree(A, K);
   FactoryImpl::setCanModify(T);
Index: clang/include/clang/Tooling/Syntax/BuildTree.h
===================================================================
--- clang/include/clang/Tooling/Syntax/BuildTree.h
+++ clang/include/clang/Tooling/Syntax/BuildTree.h
@@ -39,7 +39,7 @@
 /// Returns it as a pointer to the base class `Tree`.
 syntax::Tree *
 createTree(syntax::Arena &A,
-           std::vector<std::pair<syntax::Node *, syntax::NodeRole>> Children,
+           ArrayRef<std::pair<syntax::Node *, syntax::NodeRole>> Children,
            syntax::NodeKind K);
 
 // Synthesis of Syntax Nodes


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88024.293354.patch
Type: text/x-patch
Size: 1084 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200922/ab6d1e03/attachment.bin>


More information about the cfe-commits mailing list