forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.8'
Change-Id: Ia8bf92c8effdee0e1085730cb975ff88c8ad85fc
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user