general: Silence -Wshadow{,-uncaptured-local} warnings

These occur in the latest commits in LLVM Clang.
This commit is contained in:
lat9nq 2023-07-18 19:31:35 -04:00
parent 3fded314f2
commit 71b3b2a2f0
12 changed files with 61 additions and 58 deletions

View file

@ -23,7 +23,7 @@ std::string DemangleSymbol(const std::string& mangled) {
SCOPE_EXIT({ std::free(demangled); });
if (is_itanium(mangled)) {
demangled = llvm::itaniumDemangle(mangled.c_str(), nullptr, nullptr, nullptr);
demangled = llvm::itaniumDemangle(mangled.c_str());
}
if (!demangled) {

View file

@ -30,8 +30,8 @@ DetachedTasks::~DetachedTasks() {
void DetachedTasks::AddTask(std::function<void()> task) {
std::unique_lock lock{instance->mutex};
++instance->count;
std::thread([task{std::move(task)}]() {
task();
std::thread([task_{std::move(task)}]() {
task_();
std::unique_lock thread_lock{instance->mutex};
--instance->count;
std::notify_all_at_thread_exit(instance->cv, std::move(thread_lock));