Fix thread safety tests after r352549
authorAaron Puchert <aaron.puchert@sap.com>
Wed, 30 Jan 2019 00:18:24 +0000 (00:18 +0000)
committerAaron Puchert <aaron.puchert@sap.com>
Wed, 30 Jan 2019 00:18:24 +0000 (00:18 +0000)
llvm-svn: 352574

clang/test/PCH/thread-safety-attrs.cpp
clang/test/Sema/warn-thread-safety-analysis.c

index 3e6f029..ae2a413 100644 (file)
@@ -213,7 +213,7 @@ void sls_fun_bad_1() {
 }
 
 void sls_fun_bad_2() {
-  sls_mu.Lock();
+  sls_mu.Lock(); // expected-note{{mutex acquired here}}
   sls_mu.Lock(); // \
     // expected-warning{{acquiring mutex 'sls_mu' that is already held}}
   sls_mu.Unlock();
index 0a375b8..52dacfc 100644 (file)
@@ -77,7 +77,7 @@ int main() {
   Foo_fun1(1); // expected-warning{{calling function 'Foo_fun1' requires holding mutex 'mu2'}} \
                   expected-warning{{calling function 'Foo_fun1' requires holding mutex 'mu1' exclusively}}
 
-  mutex_exclusive_lock(&mu1);
+  mutex_exclusive_lock(&mu1); // expected-note{{mutex acquired here}}
   mutex_shared_lock(&mu2);
   Foo_fun1(1);