diff options
author | Petr Hosek <phosek@google.com> | 2022-11-30 02:30:40 +0000 |
---|---|---|
committer | Petr Hosek <phosek@google.com> | 2022-11-30 02:30:40 +0000 |
commit | c995120968993b09aeb138868b30348d6724efe2 (patch) | |
tree | bc91b760438286df6bd7a2683d2dbbdfb57726ff /clang-tools-extra/clang-doc | |
parent | f2973327496fc966c4e895973400c99d6bd63aa2 (diff) | |
download | llvm-c995120968993b09aeb138868b30348d6724efe2.tar.gz |
[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
Diffstat (limited to 'clang-tools-extra/clang-doc')
-rw-r--r-- | clang-tools-extra/clang-doc/tool/ClangDocMain.cpp | 4 |
1 files 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<llvm::sys::Mutex> 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<llvm::sys::Mutex> Guard(USRToInfoMutex); USRToInfo[Group.getKey()] = std::move(Reduced.get()); } }); |