aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorDeLesley Hutchins <delesley@google.com>2012-07-02 22:16:54 +0000
committerDeLesley Hutchins <delesley@google.com>2012-07-02 22:16:54 +0000
commit879a4334e4c4cab0c22ba91492ffc2838bbc21fc (patch)
tree360da565d7dc9daa73a6a06fbeabafebe6463bf9 /include/clang
parentc36eda1113e014400d32fbbb99be36ff0b41f795 (diff)
Thread safety analysis: fixed incorrect error message at the end of a locks_required function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159607 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Analysis/Analyses/ThreadSafety.h3
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td3
2 files changed, 5 insertions, 1 deletions
diff --git a/include/clang/Analysis/Analyses/ThreadSafety.h b/include/clang/Analysis/Analyses/ThreadSafety.h
index beb1938f85..742cc04344 100644
--- a/include/clang/Analysis/Analyses/ThreadSafety.h
+++ b/include/clang/Analysis/Analyses/ThreadSafety.h
@@ -60,7 +60,8 @@ enum AccessKind {
enum LockErrorKind {
LEK_LockedSomeLoopIterations,
LEK_LockedSomePredecessors,
- LEK_LockedAtEndOfFunction
+ LEK_LockedAtEndOfFunction,
+ LEK_NotLockedAtEndOfFunction
};
/// Handler class for thread safety warnings.
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 18b36e512f..66ae44fb28 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -1775,6 +1775,9 @@ def warn_double_lock : Warning<
def warn_no_unlock : Warning<
"mutex '%0' is still locked at the end of function">,
InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
+def warn_expecting_locked : Warning<
+ "expecting mutex '%0' to be locked at the end of function">,
+ InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
// FIXME: improve the error message about locks not in scope
def warn_lock_some_predecessors : Warning<
"mutex '%0' is not locked on every path through here">,