llvm-project/clang/unittests
Ben Hamilton 7838101678 [VirtualFileSystem] Support creating directories then adding files inside
Summary:
In https://reviews.llvm.org/D39572 , I added support for specifying
`Type` when invoking `InMemoryFileSystem::addFile()`.

However, I didn't account for the fact that when `Type` is
`directory_file`, we need to construct an `InMemoryDirectory`, not an
`InMemoryFile`, or else clients cannot create files inside that
directory.

This diff fixes the bug and adds a test.

Test Plan: New test added. Ran test with:

  % make -j12 check-clang-tools

Reviewers: bkramer, hokein

Reviewed By: bkramer

Subscribers: cfe-commits

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

llvm-svn: 318445
2017-11-16 19:34:08 +00:00
..
AST [DeclPrinter] Honor TerseOutput for constructors 2017-11-16 01:28:25 +00:00
ASTMatchers Make isDefinition matcher support ObjCMethodDecl 2017-11-14 14:17:26 +00:00
Analysis [analyzer] Performance optimizations for the CloneChecker 2017-08-31 07:10:46 +00:00
Basic [VirtualFileSystem] Support creating directories then adding files inside 2017-11-16 19:34:08 +00:00
CodeGen Reorder. 2017-10-11 04:54:05 +00:00
CrossTU [CrossTU] Fix handling of Cross Translation Unit directory path 2017-10-27 12:53:37 +00:00
Driver Use class to pass information about executable name 2017-08-29 05:22:26 +00:00
Format Refactor ContinuationIndenter's breakProtrudingToken logic. 2017-11-14 09:19:53 +00:00
Frontend Recommit r315738 "[clang-refactor] Apply source replacements" 2017-10-16 17:31:16 +00:00
Lex [Lex] Avoid out-of-bounds dereference in SkipLineComment 2017-10-14 01:18:30 +00:00
Rename [rename] support renaming class member. 2017-10-25 11:54:45 +00:00
Rewrite Remove autoconf support 2016-01-26 21:30:40 +00:00
Sema [Sema] Allow an external sema source to handle delayed typo corrections. 2016-05-19 10:46:10 +00:00
StaticAnalyzer Add a method to get the list of registered static analyzer checkers. 2016-11-08 07:23:32 +00:00
Tooling [refactor][selection] canonicalize decl ref callee to the call expr 2017-11-14 23:10:50 +00:00
libclang Fixed more signed/unsigned mismatch warnings introduced in my change at r279076 2016-08-18 20:56:48 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00