brintos

brintos / llvm-project-archived public Read only

0
0
Text · 494 B · 01eb51e Raw
25 lines · cpp
1// RUN: %check_clang_tidy %s android-cloexec-inotify-init %t2 3extern "C" int inotify_init();4 5void f() {6  inotify_init();7  // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: prefer inotify_init() to inotify_init1() because inotify_init1() allows IN_CLOEXEC [android-cloexec-inotify-init]8  // CHECK-FIXES: inotify_init1(IN_CLOEXEC);9}10 11namespace i {12int inotify_init();13void g() {14  inotify_init();15}16} // namespace i17 18class C {19public:20  int inotify_init();21  void h() {22    inotify_init();23  }24};25