1 // RUN: %check_clang_tidy %s android-cloexec-epoll-create %t 2 3 extern "C" int epoll_create(int size); 4 f()5void f() { 6 epoll_create(0); 7 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: prefer epoll_create() to epoll_create1() because epoll_create1() allows EPOLL_CLOEXEC [android-cloexec-epoll-create] 8 // CHECK-FIXES: epoll_create1(EPOLL_CLOEXEC); 9 } 10 11 namespace i { 12 int epoll_create(int size); g()13void g() { 14 epoll_create(0); 15 } 16 } // namespace i 17 18 class C { 19 public: 20 int epoll_create(int size); h()21 void h() { 22 epoll_create(0); 23 } 24 }; 25