[clangd] Replace usages of dummy with more descriptive words
Dummy is a word with inappropriate associations. This patch updates the
references to it in clangd code base with more precise ones.
The only user-visible change is the default variable name used when extracting a
variable. It will be named as `placeholder` from now on.
Differential Revision: https://reviews.llvm.org/D99065
diff --git a/clang-tools-extra/clangd/CompileCommands.cpp b/clang-tools-extra/clangd/CompileCommands.cpp
index b55d1b0..7966b7d 100644
--- a/clang-tools-extra/clangd/CompileCommands.cpp
+++ b/clang-tools-extra/clangd/CompileCommands.cpp
@@ -96,9 +96,9 @@
if (auto PathCC = llvm::sys::findProgramByName(Name))
return resolve(std::move(*PathCC));
// Fallback: a nonexistent 'clang' binary next to clangd.
- static int Dummy;
+ static int StaticForMainAddr;
std::string ClangdExecutable =
- llvm::sys::fs::getMainExecutable("clangd", (void *)&Dummy);
+ llvm::sys::fs::getMainExecutable("clangd", (void *)&StaticForMainAddr);
SmallString<128> ClangPath;
ClangPath = llvm::sys::path::parent_path(ClangdExecutable);
llvm::sys::path::append(ClangPath, "clang");
@@ -120,8 +120,9 @@
}
std::string detectStandardResourceDir() {
- static int Dummy; // Just an address in this process.
- return CompilerInvocation::GetResourcesPath("clangd", (void *)&Dummy);
+ static int StaticForMainAddr; // Just an address in this process.
+ return CompilerInvocation::GetResourcesPath("clangd",
+ (void *)&StaticForMainAddr);
}
// The path passed to argv[0] is important: