llvm-project/clang-tools-extra/clang-tidy/bugprone
abelkocsis 0f4c70dd3e [clang-tidy] Add spuriously-wake-up-functions check
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
2020-03-21 12:04:03 +01:00
..
ArgumentCommentCheck.cpp Removed an incorred namespace-end comment 2019-09-23 12:07:10 +00:00
ArgumentCommentCheck.h Add a bugprone-argument-comment option: IgnoreSingleArgument. 2019-09-05 14:48:23 +00:00
AssertSideEffectCheck.cpp Simplify with llvm::is_contained. NFC 2019-07-13 07:23:12 +00:00
AssertSideEffectCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
BadSignalToKillThreadCheck.cpp [clang-tidy] Add bugprone-bad-signal-to-kill-thread check and its alias cert-pos44-c 2019-11-11 17:47:14 +01:00
BadSignalToKillThreadCheck.h [clang-tidy] Add bugprone-bad-signal-to-kill-thread check and its alias cert-pos44-c 2019-11-11 17:47:14 +01:00
BoolPointerImplicitConversionCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BoolPointerImplicitConversionCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
BranchCloneCheck.cpp [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements 2020-01-17 14:21:38 +00:00
BranchCloneCheck.h [clang-tidy] new check: bugprone-branch-clone 2019-05-15 15:06:25 +00:00
BugproneTidyModule.cpp [clang-tidy] Add spuriously-wake-up-functions check 2020-03-21 12:04:03 +01:00
CMakeLists.txt [clang-tidy] Add spuriously-wake-up-functions check 2020-03-21 12:04:03 +01:00
CopyConstructorInitCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
CopyConstructorInitCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
DanglingHandleCheck.cpp [clang-tidy][NFCI] DanglingHandleCheck: Remove a superflous IgnoreParenImpCasts 2019-02-17 18:21:54 +00:00
DanglingHandleCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
DynamicStaticInitializersCheck.cpp [clang-tidy] Use ; as separator for HeaderFileExtensions 2020-03-09 11:32:44 -06:00
DynamicStaticInitializersCheck.h [clang-tidy] Use ; as separator for HeaderFileExtensions 2020-03-09 11:32:44 -06:00
ExceptionEscapeCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
ExceptionEscapeCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
FoldInitTypeCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FoldInitTypeCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
ForwardDeclarationNamespaceCheck.cpp NFC: Fix trivial typos in comments 2020-01-04 10:28:41 -05:00
ForwardDeclarationNamespaceCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
ForwardingReferenceOverloadCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
ForwardingReferenceOverloadCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
InaccurateEraseCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
InaccurateEraseCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
IncorrectRoundingsCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IncorrectRoundingsCheck.h Remove \brief commands from doxygen comments. 2019-08-22 11:32:57 +00:00
InfiniteLoopCheck.cpp Fix crash in InfinteLoopCheck 2020-02-13 20:20:37 +00:00
InfiniteLoopCheck.h [clang-tidy] Add missing InfiniteLoopCheck.h, InfiniteLoopCheck.cpp and test from D64736 2019-09-24 09:06:31 +00:00
IntegerDivisionCheck.cpp [NFC] use hasAnyOperatorName and hasAnyOverloadedOperatorName functions in clang-tidy matchers 2020-03-10 00:42:21 +00:00
IntegerDivisionCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
LambdaFunctionNameCheck.cpp [clang-tools-extra] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:52:23 +00:00
LambdaFunctionNameCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
MacroParenthesesCheck.cpp [Clang-Tidy] Quick fix for bug in bugprone-macro-parentheses 43804 2019-12-02 08:50:51 +01:00
MacroParenthesesCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
MacroRepeatedSideEffectsCheck.cpp Avoid including Builtins.h in Preprocessor.h 2019-11-15 16:45:16 -08:00
MacroRepeatedSideEffectsCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
MisplacedOperatorInStrlenInAllocCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MisplacedOperatorInStrlenInAllocCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
MisplacedPointerArithmeticInAllocCheck.cpp [NFC] use hasAnyOperatorName and hasAnyOverloadedOperatorName functions in clang-tidy matchers 2020-03-10 00:42:21 +00:00
MisplacedPointerArithmeticInAllocCheck.h [clang-tidy] New check: bugprone-misplaced-pointer-arithmetic-in-alloc 2020-01-21 14:38:15 +01:00
MisplacedWideningCastCheck.cpp [NFC] use hasAnyOperatorName and hasAnyOverloadedOperatorName functions in clang-tidy matchers 2020-03-10 00:42:21 +00:00
MisplacedWideningCastCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
MoveForwardingReferenceCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
MoveForwardingReferenceCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
MultipleStatementMacroCheck.cpp Remove \brief commands from doxygen comments. 2019-08-22 11:32:57 +00:00
MultipleStatementMacroCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
NotNullTerminatedResultCheck.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
NotNullTerminatedResultCheck.h [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length 2019-10-13 08:28:27 +00:00
ParentVirtualCallCheck.cpp Remove +x permission on some files 2019-11-16 14:47:20 +01:00
ParentVirtualCallCheck.h Remove +x permission on some files 2019-11-16 14:47:20 +01:00
PosixReturnCheck.cpp [NFC] use hasAnyOperatorName and hasAnyOverloadedOperatorName functions in clang-tidy matchers 2020-03-10 00:42:21 +00:00
PosixReturnCheck.h [clang-tidy] add checks to bugprone-posix-return 2019-09-16 21:43:56 +00:00
ReservedIdentifierCheck.cpp [NFC] Fix issues with clang-tidy checks list.rst 2020-02-19 23:19:09 +00:00
ReservedIdentifierCheck.h Add `bugprone-reserved-identifier` 2020-01-17 08:44:21 -05:00
SignedCharMisuseCheck.cpp [clang-tidy] extend bugprone-signed-char-misuse check. 2020-03-14 20:00:00 +01:00
SignedCharMisuseCheck.h [clang-tidy] extend bugprone-signed-char-misuse check. 2020-03-14 20:00:00 +01:00
SizeofContainerCheck.cpp [NFC] use hasAnyOperatorName and hasAnyOverloadedOperatorName functions in clang-tidy matchers 2020-03-10 00:42:21 +00:00
SizeofContainerCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
SizeofExpressionCheck.cpp [NFC] use hasAnyOperatorName and hasAnyOverloadedOperatorName functions in clang-tidy matchers 2020-03-10 00:42:21 +00:00
SizeofExpressionCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
SpuriouslyWakeUpFunctionsCheck.cpp [clang-tidy] Add spuriously-wake-up-functions check 2020-03-21 12:04:03 +01:00
SpuriouslyWakeUpFunctionsCheck.h [clang-tidy] Add spuriously-wake-up-functions check 2020-03-21 12:04:03 +01:00
StringConstructorCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
StringConstructorCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
StringIntegerAssignmentCheck.cpp [NFC] use hasAnyOperatorName and hasAnyOverloadedOperatorName functions in clang-tidy matchers 2020-03-10 00:42:21 +00:00
StringIntegerAssignmentCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
StringLiteralWithEmbeddedNulCheck.cpp NFC: Fix trivial typos in comments 2020-01-04 10:28:41 -05:00
StringLiteralWithEmbeddedNulCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
SuspiciousEnumUsageCheck.cpp [NFC] use hasAnyOperatorName and hasAnyOverloadedOperatorName functions in clang-tidy matchers 2020-03-10 00:42:21 +00:00
SuspiciousEnumUsageCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
SuspiciousIncludeCheck.cpp [clang-tidy] New check: bugprone-suspicious-include 2020-03-12 09:59:28 -06:00
SuspiciousIncludeCheck.h [clang-tidy] New check: bugprone-suspicious-include 2020-03-12 09:59:28 -06:00
SuspiciousMemsetUsageCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SuspiciousMemsetUsageCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
SuspiciousMissingCommaCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SuspiciousMissingCommaCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
SuspiciousSemicolonCheck.cpp [clang-tidy] Fix PR35824 2019-11-27 11:07:16 -08:00
SuspiciousSemicolonCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
SuspiciousStringCompareCheck.cpp [NFC] use hasAnyOperatorName and hasAnyOverloadedOperatorName functions in clang-tidy matchers 2020-03-10 00:42:21 +00:00
SuspiciousStringCompareCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
SwappedArgumentsCheck.cpp Remove \brief commands from doxygen comments. 2019-08-22 11:32:57 +00:00
SwappedArgumentsCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
TerminatingContinueCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TerminatingContinueCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
ThrowKeywordMissingCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
ThrowKeywordMissingCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
TooSmallLoopVariableCheck.cpp Remove \brief commands from doxygen comments. 2019-08-22 11:32:57 +00:00
TooSmallLoopVariableCheck.h [clang-tidy] Add MagnitudeBitsUpperLimit option to bugprone-too-small-loop-variable 2019-04-14 12:47:48 +00:00
UndefinedMemoryManipulationCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UndefinedMemoryManipulationCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
UndelegatedConstructorCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
UndelegatedConstructorCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
UnhandledSelfAssignmentCheck.cpp [NFC] use hasAnyOperatorName and hasAnyOverloadedOperatorName functions in clang-tidy matchers 2020-03-10 00:42:21 +00:00
UnhandledSelfAssignmentCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
UnusedRaiiCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
UnusedRaiiCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
UnusedReturnValueCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UnusedReturnValueCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
UseAfterMoveCheck.cpp [NFC] use hasAnyOperatorName and hasAnyOverloadedOperatorName functions in clang-tidy matchers 2020-03-10 00:42:21 +00:00
UseAfterMoveCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
VirtualNearMissCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
VirtualNearMissCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00