aaron.ballman added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp:45-46 "misc-redundant-expression"); + CheckFactories.registerCheck<SpuriouslyWakeUpFunctionsCheck>( + "misc-spuriously-wake-up-functions"); CheckFactories.registerCheck<StaticAssertCheck>("misc-static-assert"); ---------------- If we want to expose this check outside of the CERT module, I think it should go into `bugprone` rather than `misc`. ================ Comment at: clang-tools-extra/clang-tidy/misc/SpuriouslyWakeUpFunctionsCheck.cpp:62 + auto hasWaitDescendantC = + hasDescendant(callExpr(callee(functionDecl(allOf(hasName("cnd_wait"), + parameterCountIs(2))))) ---------------- What about `cnd_timedwait`? ================ Comment at: clang-tools-extra/clang-tidy/misc/SpuriouslyWakeUpFunctionsCheck.h:19 +/// Finds ``cnd_wait`` or `wait` function calls in an ``IfStmt`` and tries to +/// replace it with ``WhileStm``. +/// ---------------- WhileStm -> WhileStmt ================ Comment at: clang-tools-extra/test/clang-tidy/misc-spuriously-wake-up-functions.cpp:1 +// RUN: %check_clang_tidy %s misc-spuriously-wake-up-functions %t -- -- -I %S/../../../libcxx/include/ + ---------------- Eugene.Zelenko wrote: > What will happen if libcxx is not part build/source tree? Also, there are no tests for the C functionality yet. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70876/new/ https://reviews.llvm.org/D70876 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits