[clang] [analyzer] Use explicit call description mode in more checkers (PR #90974)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Tue May 7 04:43:10 PDT 2024


================
@@ -149,26 +149,34 @@ class BlockInCriticalSectionChecker : public Checker<check::PostCall> {
 private:
   const std::array<MutexDescriptor, 8> MutexDescriptors{
       MemberMutexDescriptor(
-          CallDescription(/*QualifiedName=*/{"std", "mutex", "lock"},
+          CallDescription(/*MatchAs=*/CDM::CXXMethod,
+                          /*QualifiedName=*/{"std", "mutex", "lock"},
                           /*RequiredArgs=*/0),
----------------
NagyDonat wrote:

I uploaded a commit that switches to `{...}`.

Interestingly the initializer of `std::array<...> BlockingFunctions` did not work with `{...}` instead of  `CallDescription(...)` -- but now that I looked at it I realized that it should be a `CallDescriptionSet` instead of a generic STL array.

https://github.com/llvm/llvm-project/pull/90974


More information about the cfe-commits mailing list