[clang] 17b64e3 - [clang][ScanDeps] Fix shadowing warning.
Michael Spencer via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 30 15:53:57 PDT 2019
Author: Michael Spencer
Date: 2019-10-30T15:53:38-07:00
New Revision: 17b64e36e90ad05a32a99b9f5784b55310cc10e8
URL: https://github.com/llvm/llvm-project/commit/17b64e36e90ad05a32a99b9f5784b55310cc10e8
DIFF: https://github.com/llvm/llvm-project/commit/17b64e36e90ad05a32a99b9f5784b55310cc10e8.diff
LOG: [clang][ScanDeps] Fix shadowing warning.
Added:
Modified:
clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
Removed:
################################################################################
diff --git a/clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp b/clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
index bffd7c338124..4b10f24167a8 100644
--- a/clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
+++ b/clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
@@ -85,7 +85,7 @@ DependencyScanningTool::getDependencyFile(const std::string &Input,
}
void handleModuleDependency(ModuleDeps MD) override {
- ModuleDeps[MD.ContextHash + MD.ModuleName] = std::move(MD);
+ ClangModuleDeps[MD.ContextHash + MD.ModuleName] = std::move(MD);
}
void handleContextHash(std::string Hash) override {
@@ -95,7 +95,7 @@ DependencyScanningTool::getDependencyFile(const std::string &Input,
void printDependencies(std::string &S, StringRef MainFile) {
// Sort the modules by name to get a deterministic order.
std::vector<StringRef> Modules;
- for (auto &&Dep : ModuleDeps)
+ for (auto &&Dep : ClangModuleDeps)
Modules.push_back(Dep.first);
std::sort(Modules.begin(), Modules.end());
@@ -105,14 +105,14 @@ DependencyScanningTool::getDependencyFile(const std::string &Input,
Array Imports;
for (auto &&ModName : Modules) {
- auto &MD = ModuleDeps[ModName];
+ auto &MD = ClangModuleDeps[ModName];
if (MD.ImportedByMainFile)
Imports.push_back(MD.ModuleName);
}
Array Mods;
for (auto &&ModName : Modules) {
- auto &MD = ModuleDeps[ModName];
+ auto &MD = ClangModuleDeps[ModName];
Object Mod{
{"name", MD.ModuleName},
{"file-deps", toJSONSorted(MD.FileDeps)},
@@ -136,7 +136,7 @@ DependencyScanningTool::getDependencyFile(const std::string &Input,
private:
std::vector<std::string> Dependencies;
- std::unordered_map<std::string, ModuleDeps> ModuleDeps;
+ std::unordered_map<std::string, ModuleDeps> ClangModuleDeps;
std::string ContextHash;
};
More information about the cfe-commits
mailing list