xazax.hun marked 2 inline comments as done.
xazax.hun added inline comments.
================
Comment at: clang/test/Analysis/c11lock.c:7
+enum {
+ thrd_success = 0,
+ thrd_error = 2
----------------
Strictly speaking, this is implementation defined. But the C11 implementations
I am aware of are following this trend (`thrd_success == 0`). E.g. if the
implementation is using pthreads as a backend it is unlikely for this to be any
other value.
================
Comment at: clang/test/Analysis/c11lock.c:32
+ mtx_lock(&mtx);
+} // TODO: Warn for missing unlock?
+
----------------
This is a TODO, and I did not solve in this patch for two reasons:
* Having a mutex in stack scope is rare and prone to errors.
* I did not want to add new functionality in this patch.
That being said I am not sure if I want to add this anytime soon (due to reason
1).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73376/new/
https://reviews.llvm.org/D73376
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits