[PATCH] D138961: [clang-doc] Fix warnings about lock_guard.

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 29 18:31:41 PST 2022


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc99512096899: [clang-doc] Fix warnings about lock_guard (authored by phosek).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138961/new/

https://reviews.llvm.org/D138961

Files:
  clang-tools-extra/clang-doc/tool/ClangDocMain.cpp


Index: clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
===================================================================
--- clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
+++ clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
@@ -264,13 +264,13 @@
 
       // 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());
       }
     });


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138961.478778.patch
Type: text/x-patch
Size: 791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221130/d0ab426b/attachment.bin>


More information about the cfe-commits mailing list