r187387 - Remove assert header dependency in test
David Blaikie
dblaikie at gmail.com
Mon Jul 29 15:37:43 PDT 2013
Author: dblaikie
Date: Mon Jul 29 17:37:42 2013
New Revision: 187387
URL: http://llvm.org/viewvc/llvm-project?rev=187387&view=rev
Log:
Remove assert header dependency in test
Modified:
cfe/trunk/test/Sema/warn-thread-safety-analysis.c
Modified: cfe/trunk/test/Sema/warn-thread-safety-analysis.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/warn-thread-safety-analysis.c?rev=187387&r1=187386&r2=187387&view=diff
==============================================================================
--- cfe/trunk/test/Sema/warn-thread-safety-analysis.c (original)
+++ cfe/trunk/test/Sema/warn-thread-safety-analysis.c Mon Jul 29 17:37:42 2013
@@ -1,7 +1,5 @@
// RUN: %clang -fsyntax-only -verify -Wthread-safety -Wthread-safety-beta -fcxx-exceptions %s
-#include <assert.h>
-
#define LOCKABLE __attribute__ ((lockable))
#define SCOPED_LOCKABLE __attribute__ ((scoped_lockable))
#define GUARDED_BY(x) __attribute__ ((guarded_by(x)))
@@ -111,14 +109,14 @@ int main() {
set_value(&a_, 1);
mutex_unlock(foo_.mu_);
mutex_shared_lock(foo_.mu_);
- assert(get_value(b_) == 1);
+ (void)(get_value(b_) == 1);
mutex_unlock(foo_.mu_);
c_ = 0; // expected-warning{{writing variable 'c_' requires locking any mutex exclusively}}
- assert(*d_ == 0); // expected-warning{{reading the value pointed to by 'd_' requires locking any mutex}}
+ (void)(*d_ == 0); // expected-warning{{reading the value pointed to by 'd_' requires locking any mutex}}
mutex_exclusive_lock(foo_.mu_);
c_ = 1;
- assert(*d_ == 1);
+ (void)(*d_ == 1);
mutex_unlock(foo_.mu_);
return 0;
More information about the cfe-commits
mailing list