Thread safety analysis: new test case
authorDeLesley Hutchins <delesley@google.com>
Fri, 16 Aug 2013 18:28:00 +0000 (18:28 +0000)
committerDeLesley Hutchins <delesley@google.com>
Fri, 16 Aug 2013 18:28:00 +0000 (18:28 +0000)
llvm-svn: 188571

clang/test/SemaCXX/warn-thread-safety-analysis.cpp

index 6c5fd85..08c6f85 100644 (file)
@@ -4131,6 +4131,13 @@ public:
     a = 0;
     mu.Unlock();
   }
+
+  void test10() {
+    if (!(c || !mu.TryLock())) {
+      a = 0;
+      mu.Unlock();
+    }
+  }
 };
 
 }  // end namespace LogicalConditionalTryLock