srhines added inline comments.
================ Comment at: clang-tools-extra/test/clang-tidy/android-cloexec-pipe2.cpp:52 + +void e() { + int pipefd[2]; ---------------- jcai19 wrote: > srhines wrote: > > I'm not all that familiar with writing clang-tidy-specific tests, but > > should these tests here denote that a diagnostic should NOT be issued? That > > is usually the convention in regular Clang tests, so I assume the test > > runner here should be equally supportive of ensuring that the contents > > passed through without any other diagnostics related to pipe2 and/or > > O_CLOEXEC. > That makes sense, and I have seem tests for similar checks with (e.g. > android-cloexec-open) and without (e.g. android-cloexec-accep4 and > android-cloexec-socket) additional CHECK-MESSAGES-NOT check. But based on the > Testing Checks section of > https://clang.llvm.org/extra/clang-tidy/Contributing.html, it seems typically > CHECK-MASSAGES and CHECK-FIXES are sufficient for clang-tidy checks. Please > let me know what you think. If you look in test/clang-tidy/android-cloexec-creat.cpp, you will see that there are "CHECK-MESSAGES-NOT" checks that ensure the diagnostic is not issued in correct cases. You can put the checks on lines 39, 58, and 67, which will ensure that there are no additional diagnostics being generated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62049/new/ https://reviews.llvm.org/D62049 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits