aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Analysis
diff options
context:
space:
mode:
authorAaron Puchert <aaron.puchert@sap.com>2019-03-18 23:26:54 +0000
committerAaron Puchert <aaron.puchert@sap.com>2019-03-18 23:26:54 +0000
commitae6410c918412e7921d3722e20b3a5600ae3e46c (patch)
tree4083d770341eca3f4647024683861928c8489938 /include/clang/Analysis
parent1752683c9362f7357d7ed3ff55ea5b4eac70caaf (diff)
Thread safety analysis: Add note for unlock kind mismatch
Summary: Similar to D56967, we add the existing diag::note_locked_here to tell the user where we saw the locking that isn't matched correctly. Reviewers: aaron.ballman, delesley Reviewed By: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59455 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356427 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis')
-rw-r--r--include/clang/Analysis/Analyses/ThreadSafety.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/clang/Analysis/Analyses/ThreadSafety.h b/include/clang/Analysis/Analyses/ThreadSafety.h
index 2f0c68c8d6..79cdac2527 100644
--- a/include/clang/Analysis/Analyses/ThreadSafety.h
+++ b/include/clang/Analysis/Analyses/ThreadSafety.h
@@ -119,9 +119,11 @@ public:
/// \param Kind -- the capability's name parameter (role, mutex, etc).
/// \param Expected -- the kind of lock expected.
/// \param Received -- the kind of lock received.
+ /// \param LocLocked -- The SourceLocation of the Lock.
/// \param Loc -- The SourceLocation of the Unlock.
virtual void handleIncorrectUnlockKind(StringRef Kind, Name LockName,
LockKind Expected, LockKind Received,
+ SourceLocation LocLocked,
SourceLocation Loc) {}
/// Warn about lock function calls for locks which are already held.