Merge remote-tracking branch 'origin/4.8'

Change-Id: Ia8bf92c8effdee0e1085730cb975ff88c8ad85fc
This commit is contained in:
Orgad Shaneh
2018-11-20 19:13:13 +02:00
80 changed files with 1545 additions and 1057 deletions

View File

@@ -135,6 +135,8 @@ clang::tooling::ClangTool ClangTool::createTool() const
tool.mapVirtualFile(toStringRef(unsavedFileContent.filePath),
toStringRef(unsavedFileContent.content));
tool.mapVirtualFile("/dummyFile", "#pragma once");
return tool;
}

View File

@@ -54,6 +54,12 @@ public:
&& first.lastModified == second.lastModified;
}
friend
bool operator<(const FileStatus &first, const FileStatus &second)
{
return first.filePathId < second.filePathId;
}
public:
FilePathId filePathId;
off_t size;

View File

@@ -34,17 +34,26 @@ namespace ClangBackEnd {
class SourceDependency
{
public:
SourceDependency(FilePathId filePathId,
FilePathId dependencyFilePathId)
: filePathId(filePathId),
dependencyFilePathId(dependencyFilePathId)
SourceDependency(FilePathId filePathId, FilePathId dependencyFilePathId)
: filePathId(filePathId)
, dependencyFilePathId(dependencyFilePathId)
{}
friend
bool operator==(SourceDependency first, SourceDependency second)
friend bool operator==(SourceDependency first, SourceDependency second)
{
return first.filePathId == second.filePathId
&& first.dependencyFilePathId == second.dependencyFilePathId;
&& first.dependencyFilePathId == second.dependencyFilePathId;
}
friend bool operator!=(SourceDependency first, SourceDependency second)
{
return !(first == second);
}
friend bool operator<(SourceDependency first, SourceDependency second)
{
return std::tie(first.filePathId, first.dependencyFilePathId)
< std::tie(second.filePathId, second.dependencyFilePathId);
}
public:
@@ -53,4 +62,4 @@ public:
};
using SourceDependencies = std::vector<SourceDependency>;
}
} // namespace ClangBackEnd

View File

@@ -145,7 +145,7 @@ public:
return SymbolIndex(reinterpret_cast<std::uintptr_t>(pointer));
}
void setSourceManager(const clang::SourceManager *sourceManager)
void setSourceManager(clang::SourceManager *sourceManager)
{
m_sourceManager = sourceManager;
}