forked from OSchip/llvm-project
[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
This commit is contained in:
parent
f297332749
commit
c995120968
|
@ -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());
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue