[PATCH] D153132: [clang analysis][NFCI] Preparatory work for D153131.
Aaron Puchert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 28 20:16:32 PDT 2023
aaronpuchert accepted this revision.
aaronpuchert added a comment.
This revision is now accepted and ready to land.
Got it, so it's because we want to work on a different fact set than what `BuildLockset` holds.
Yeah, I think this makes sense. And after all the methods aren't too far away from the other `ThreadSafetyAnalyzer` methods.
================
Comment at: clang/lib/Analysis/ThreadSafety.cpp:1019-1030
+ void warnIfMutexNotHeld(const FactSet &FSet, const NamedDecl *D,
+ const Expr *Exp, AccessKind AK, Expr *MutexExp,
+ ProtectedOperationKind POK, til::LiteralPtr *Self,
+ SourceLocation Loc);
+ void warnIfMutexHeld(const FactSet &FSet, const NamedDecl *D, const Expr *Exp,
+ Expr *MutexExp, til::LiteralPtr *Self,
+ SourceLocation Loc);
----------------
You could also put them in the public section. In fact your change would seem to get us pretty close to being able to unfriend `BuildLockset`.
================
Comment at: clang/lib/Analysis/ThreadSafety.cpp:1604-1606
+ Handler.handleFunExcludesLock(Cp.getKind(), D->getNameAsString(),
+ (!Cp).toString(), Loc);
+ return;
----------------
Something went wrong with the indentation here, also in the following `if`s. Should be two spaces only.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153132/new/
https://reviews.llvm.org/D153132
More information about the cfe-commits
mailing list