[PATCH] D85913: [SyntaxTree] Split `TreeTestBase` into header and source

Eduardo Caldas via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 13 10:31:34 PDT 2020


eduucaldas added a reviewer: gribozavr2.
eduucaldas added inline comments.


================
Comment at: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp:15-17
+using namespace clang;
+using namespace clang::syntax;
+
----------------
Following the [[ https://llvm.org/docs/CodingStandards.html#use-namespace-qualifiers-to-implement-previously-declared-functions | style-guide ]] 


================
Comment at: clang/unittests/Tooling/Syntax/MutationsTest.cpp:15
 #include "TreeTestBase.h"
+#include "clang/Tooling/Syntax/BuildTree.h"
+
----------------
Moved from `TreeTestBase` as this include was only used by `MutationsTest`


================
Comment at: clang/unittests/Tooling/Syntax/TreeTestBase.h:163-169
-  // Adds a file to the test VFS.
-  void addFile(StringRef Path, StringRef Contents) {
-    if (!FS->addFile(Path, time_t(),
-                     llvm::MemoryBuffer::getMemBufferCopy(Contents))) {
-      ADD_FAILURE() << "could not add a file to VFS: " << Path;
-    }
-  }
----------------
Removed because unused


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85913



More information about the cfe-commits mailing list