[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Analysis / pthreadlock_state_nottracked.c
blob44023e7fc15c470ae6dcf987b2eff2496021ee70
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.unix.PthreadLock,debug.ExprInspection 2>&1 %s | FileCheck %s
3 #include "Inputs/system-header-simulator-for-pthread-lock.h"
5 #define NULL 0
7 void clang_analyzer_printState(void);
9 void test(pthread_mutex_t *mtx) {
10 int ret = pthread_mutex_destroy(mtx);
11 clang_analyzer_printState();
12 // CHECK: { "checker": "alpha.core.PthreadLockBase", "messages": [
13 // CHECK-NEXT: "Mutex states:",
14 // CHECK-NEXT: "SymRegion{reg_$[[REG:[0-9]+]]<pthread_mutex_t * mtx>}: not tracked, possibly destroyed",
15 // CHECK-NEXT: "Mutexes in unresolved possibly destroyed state:",
16 // CHECK-NEXT: "SymRegion{reg_$[[REG]]<pthread_mutex_t * mtx>}: conj_$
17 // CHECK-NEXT: ""
18 // CHECK-NEXT: ]}
19 if (ret)
20 return;
21 pthread_mutex_init(mtx, NULL);