10#include "clang/Basic/FileEntry.h"
11#include "clang/Basic/FileManager.h"
12#include "clang/Basic/FileSystemOptions.h"
13#include "clang/Basic/LangOptions.h"
14#include "llvm/ADT/IntrusiveRefCntPtr.h"
15#include "llvm/ADT/StringRef.h"
16#include "llvm/Support/Error.h"
17#include "llvm/Support/VirtualFileSystem.h"
18#include "llvm/Testing/Support/Error.h"
19#include "gtest/gtest.h"
25FileEntryRef addFile(llvm::vfs::InMemoryFileSystem &FS, FileManager &FM,
27 FS.addFile(
Filename, 0, llvm::MemoryBuffer::getMemBuffer(
""));
29 EXPECT_THAT_EXPECTED(
File, llvm::Succeeded());
33TEST(CanonicalIncludesTest, SystemHeaderMap) {
34 auto InMemFS = llvm::makeIntrusiveRefCnt<llvm::vfs::InMemoryFileSystem>();
35 FileManager Files(FileSystemOptions(), InMemFS);
39 Language.CPlusPlus =
true;
40 CI.addSystemHeadersMapping(Language);
46 auto STLVectorFile = addFile(*InMemFS, Files,
"bits/stl_vector.h");
47 ASSERT_EQ(
"<vector>",
CI.mapHeader(STLVectorFile.getName()));
std::string Filename
Filename as a string.
std::unique_ptr< CompilerInvocation > CI
TEST(BackgroundQueueTest, Priority)
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//