Use mapAnyOf() and matchers based on it. Use of binaryOperation() means that modernize-loop-convert and readability-container-size-empty can now be used with rewritten binary operators. Differential Revision: https://reviews.llvm.org/D94131
Applied fixes enabled by the LLVM's .clang-tidy configs. Reverted files where fixes introduced compile errors: clang-tools-extra/clang-tidy/hicpp/NoAssemblerCheck.cpp clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp $ clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -fix clang-tools-extra/clang-tidy/ Enabled checks: llvm-else-after-return llvm-header-guard llvm-include-order llvm-namespace-comment llvm-prefer-isa-or-dyn-cast-in-conditionals llvm-prefer-register-over-unsigned llvm-qualified-auto llvm-twine-local misc-definitions-in-headers misc-misplaced-const misc-new-delete-overloads misc-no-recursion misc-non-copyable-objects misc-redundant-expression misc-static-assert misc-throw-by-value-catch-by-reference misc-unconventional-assign-operator misc-uniqueptr-reset-release misc-unused-alias-decls misc-unused-using-decls readability-identifier-naming Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D95614
Summary: According to https://wiki.sei.cmu.edu/confluence/display/cplusplus/CON54-CPP.+Wrap+functions+that+can+spuriously+wake+up+in+a+loop and https://wiki.sei.cmu.edu/confluence/display/c/CON36-C.+Wrap+functions+that+can+spuriously+wake+up+in+a+loop misc-spuriously-wake-up-functions check is created. The check finds `cnd_wait` or `wait` function calls in an `IfStmt` and warns the user to replace it with a `WhileStmt` or use it with a lambda parameter. Reviewers: aaron.ballman, alexfh, hokein, jfb, Charusso Reviewed By: aaron.ballman Subscribers: sylvestre.ledru, whisperity, Eugene.Zelenko, mgorny, dexonsmith, cfe-commits, gerazo, xazax.hun, steakhal, Charusso Tags: #clang-tools-extra, #clang Differential Revision: https://reviews.llvm.org/D70876