You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
535 B
16 lines
535 B
// RUN: %check_clang_tidy %s concurrency-mt-unsafe %t -- -config='{CheckOptions: [{key: "concurrency-mt-unsafe.FunctionSet", value: "glibc"}]}'
|
|
|
|
extern unsigned int sleep (unsigned int __seconds);
|
|
extern int *gmtime (const int *__timer);
|
|
extern char *dirname (char *__path);
|
|
|
|
void foo() {
|
|
sleep(2);
|
|
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: function is not thread safe [concurrency-mt-unsafe]
|
|
|
|
::sleep(2);
|
|
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: function is not thread safe [concurrency-mt-unsafe]
|
|
|
|
dirname(nullptr);
|
|
}
|