1// RUN: %check_clang_tidy %s cert-env33-c %t
2
3typedef struct FILE {} FILE;
4
5extern int system(const char *);
6extern FILE *popen(const char *, const char *);
7extern FILE *_popen(const char *, const char *);
8
9void f(void) {
10 // It is permissible to check for the presence of a command processor.
11 system(0);
12
13 system("test");
14 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: calling 'system' uses a command processor [cert-env33-c]
15
16 popen("test", "test");
17 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: calling 'popen' uses a command processor
18 _popen("test", "test");
19 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: calling '_popen' uses a command processor
20}
21

source code of clang-tools-extra/test/clang-tidy/checkers/cert/env33-c.c