[PATCH] D73376: [analyzer] Add FuchsiaLockChecker and C11LockChecker
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 27 11:44:07 PST 2020
NoQ added inline comments.
================
Comment at: clang/test/Analysis/c11lock.c:7
+enum {
+ thrd_success = 0,
+ thrd_error = 2
----------------
xazax.hun wrote:
> 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.
Yeah, this is most likely fine but we should add a FIXME just in case. We could most likely uncover the exact constant easily by simply matching the AST (and abort all checking if the constant isn't found in the AST).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73376/new/
https://reviews.llvm.org/D73376
More information about the cfe-commits
mailing list