From c995120968993b09aeb138868b30348d6724efe2 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 30 Nov 2022 02:30:40 +0000 Subject: [PATCH] [clang-doc] Fix warnings about lock_guard Fixes a warning about a potentially unsupported template argument deduction by explicitly specifying the template type in std::lock_guard. Patch By: brettw Differential Revision: https://reviews.llvm.org/D138961 --- clang-tools-extra/clang-doc/tool/ClangDocMain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp b/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp index 83bfea027bbc..2ece3e4c071d 100644 --- a/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp +++ b/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp @@ -264,13 +264,13 @@ Example usage for a project using a compile commands database: // Add a reference to this Info in the Index { - std::lock_guard Guard(IndexMutex); + std::lock_guard Guard(IndexMutex); clang::doc::Generator::addInfoToIndex(CDCtx.Idx, Reduced.get().get()); } // Save in the result map (needs a lock due to threaded access). { - std::lock_guard Guard(USRToInfoMutex); + std::lock_guard Guard(USRToInfoMutex); USRToInfo[Group.getKey()] = std::move(Reduced.get()); } });