llvm-project/clang-tools-extra/clang-tidy/misc
Etienne Bergeron 1b94f6504b [clang-tidy] Enhance misc-suspicious-string-compare to move down false-positives.
Summary:
The checker was noisy when running over llvm code base.
This patch is impriving the way string-compare functions are matched.

1) By default, do not report !strcmp(...) unless it's activate by the user,
2) Only match suspicious expression over a subset of expression (binary operator),
3) Added matching of macro wrapper used with clang on linux.

See bug: 27465.

Reviewers: alexfh

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D19497

llvm-svn: 267570
2016-04-26 16:53:21 +00:00
..
ArgumentCommentCheck.cpp Refactors AST matching code to use the new AST matcher names. This patch correlates to r247885 which performs the AST matcher rename in Clang. 2015-09-17 13:31:25 +00:00
ArgumentCommentCheck.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
AssertSideEffectCheck.cpp Add support to the misc-assert-side-effect check for MSVC-style assert macros, which use !! instead of an if statement or a conditional operator. 2016-01-25 20:00:53 +00:00
AssertSideEffectCheck.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
AssignOperatorSignatureCheck.cpp [clang-tidy] misc-assign-operator-signature checker checks return value of all assign operators 2016-03-24 10:12:08 +00:00
AssignOperatorSignatureCheck.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
BoolPointerImplicitConversionCheck.cpp [clang-tidy] Cleanup some ast-matchers and lift some to utils. 2016-04-21 16:57:56 +00:00
BoolPointerImplicitConversionCheck.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
CMakeLists.txt A clang-tidy check for std:accumulate. 2016-04-26 10:05:45 +00:00
DanglingHandleCheck.cpp [clang-tidy] Adjust dangling references check to ASTMatcher changes. 2016-03-30 12:16:09 +00:00
DanglingHandleCheck.h [clang-tidy] Add check to detect dangling references in value handlers. 2016-03-29 18:02:26 +00:00
DefinitionsInHeadersCheck.cpp [clang-tidy] Remove unnecessary getName() on Decls and Types feeding into a DiagnosticBuilder 2016-04-07 14:55:25 +00:00
DefinitionsInHeadersCheck.h [clang-tdiy] Add header file extension configuration support. 2016-02-05 11:23:59 +00:00
FoldInitTypeCheck.cpp A clang-tidy check for std:accumulate. 2016-04-26 10:05:45 +00:00
FoldInitTypeCheck.h A clang-tidy check for std:accumulate. 2016-04-26 10:05:45 +00:00
ForwardDeclarationNamespaceCheck.cpp [clang-tidy] Remove unnecessary getName() on Decls and Types feeding into a DiagnosticBuilder 2016-04-07 14:55:25 +00:00
ForwardDeclarationNamespaceCheck.h [clang-tidy] Added a check for forward declaration in the potentially wrong namespace 2016-02-24 13:35:32 +00:00
InaccurateEraseCheck.cpp Refactors AST matching code to use the new AST matcher names. This patch correlates to r247885 which performs the AST matcher rename in Clang. 2015-09-17 13:31:25 +00:00
InaccurateEraseCheck.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
IncorrectRoundings.cpp [clang-tidy] Cleanup some ast-matchers and lift some to utils. 2016-04-21 16:57:56 +00:00
IncorrectRoundings.h [clang-tidy] Correct IncorrectRoundings namespace. 2016-02-08 15:54:30 +00:00
InefficientAlgorithmCheck.cpp [clang-tidy] Fix check broken in rL263822. 2016-03-21 18:00:43 +00:00
InefficientAlgorithmCheck.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
MacroParenthesesCheck.cpp [clang-tidy] Cleanup some ast-matchers and lift some to utils. 2016-04-21 16:57:56 +00:00
MacroParenthesesCheck.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
MacroRepeatedSideEffectsCheck.cpp [clang-tidy] Fix misc-macro-repeated-side-effects false positive with stringified arguments 2016-04-23 00:00:08 +00:00
MacroRepeatedSideEffectsCheck.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
MiscTidyModule.cpp A clang-tidy check for std:accumulate. 2016-04-26 10:05:45 +00:00
MisplacedWideningCastCheck.cpp [clang-tidy] Cleanup some ast-matchers and lift some to utils. 2016-04-21 16:57:56 +00:00
MisplacedWideningCastCheck.h [clang-tidy] Extension of checker misc-misplaced-widening-cast 2016-04-06 12:04:51 +00:00
MoveConstantArgumentCheck.cpp [clang-tidy] Fix a typo in my latest commit. 2015-11-25 16:38:22 +00:00
MoveConstantArgumentCheck.h [clang-tidy] Const std::move() argument ClangTidy check 2015-11-25 15:56:11 +00:00
MoveConstructorInitCheck.cpp Disable part of the misc-move-constructor-init checker when the check is enabled through cert-oop11-cpp. The CERT guideline does not cover moveable parameters as part of the OOP11-CPP recommendation, just copy construction from move constructors. 2016-01-08 15:50:51 +00:00
MoveConstructorInitCheck.h Disable part of the misc-move-constructor-init checker when the check is enabled through cert-oop11-cpp. The CERT guideline does not cover moveable parameters as part of the OOP11-CPP recommendation, just copy construction from move constructors. 2016-01-08 15:50:51 +00:00
MultipleStatementMacroCheck.cpp [clang-tidy] Add check misc-multiple-statement-macro 2016-04-14 21:15:57 +00:00
MultipleStatementMacroCheck.h [clang-tidy] Add check misc-multiple-statement-macro 2016-04-14 21:15:57 +00:00
NewDeleteOverloadsCheck.cpp [clang-tidy] Fix a crash in misc-new-delete-overloads 2015-12-16 10:58:14 +00:00
NewDeleteOverloadsCheck.h Adding a checker (misc-new-delete-overloads) that detects mismatched overloads of operator new and operator delete. Corresponds to the CERT C++ secure coding rule: https://www.securecoding.cert.org/confluence/display/cplusplus/DCL54-CPP.+Overload+allocation+and+deallocation+functions+as+a+pair+in+the+same+scope 2015-09-29 13:12:21 +00:00
NoexceptMoveConstructorCheck.cpp Refactors AST matching code to use the new AST matcher names. This patch correlates to r247885 which performs the AST matcher rename in Clang. 2015-09-17 13:31:25 +00:00
NoexceptMoveConstructorCheck.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
NonCopyableObjects.cpp [clang-tidy] Remove unnecessary getName() on Decls and Types feeding into a DiagnosticBuilder 2016-04-07 14:55:25 +00:00
NonCopyableObjects.h Adding a checker (misc-non-copyable-objects) that detects situations where a non-copyable C type is being dereferenced, such as FILE or pthread_mutex_t. Corresponds to the CERT C++ secure coding rule: https://www.securecoding.cert.org/confluence/display/c/FIO38-C.+Do+not+copy+a+FILE+object 2015-09-30 14:09:38 +00:00
PointerAndIntegralOperationCheck.cpp [clang-tidy] Cleanup some ast-matchers and lift some to utils. 2016-04-21 16:57:56 +00:00
PointerAndIntegralOperationCheck.h [clang-tidy] Add checker for operations between integrals and pointers 2016-04-15 16:31:15 +00:00
SizeofContainerCheck.cpp Refactors AST matching code to use the new AST matcher names. This patch correlates to r247885 which performs the AST matcher rename in Clang. 2015-09-17 13:31:25 +00:00
SizeofContainerCheck.h [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stl 2015-09-10 16:37:46 +00:00
SizeofExpressionCheck.cpp [clang-tidy] Cleanup some ast-matchers and lift some to utils. 2016-04-21 16:57:56 +00:00
SizeofExpressionCheck.h Add missing override keyword to silence -Winconsistent-missing-override. NFC 2016-04-16 02:42:03 +00:00
StaticAssertCheck.cpp Refactors AST matching code to use the new AST matcher names. This patch correlates to r247885 which performs the AST matcher rename in Clang. 2015-09-17 13:31:25 +00:00
StaticAssertCheck.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
StringConstructorCheck.cpp [clang-tidy] New checker to detect suspicious string constructor. 2016-04-21 17:28:08 +00:00
StringConstructorCheck.h [Clang-tidy] Fix Clang warning in misc/StringConstructorCheck.h. 2016-04-22 21:33:33 +00:00
StringIntegerAssignmentCheck.cpp [clang-tidy] Check for suspicious string assignments. 2015-12-15 08:47:20 +00:00
StringIntegerAssignmentCheck.h [clang-tidy] Check for suspicious string assignments. 2015-12-15 08:47:20 +00:00
StringLiteralWithEmbeddedNulCheck.cpp [clang-tidy] add new checker for string literal with NUL character. 2016-04-07 16:16:36 +00:00
StringLiteralWithEmbeddedNulCheck.h [clang-tidy] add new checker for string literal with NUL character. 2016-04-07 16:16:36 +00:00
SuspiciousMissingCommaCheck.cpp [clang-tidy] Reduce false-positive ratio in misc-suspicious-missing-comma check. 2016-04-04 15:46:38 +00:00
SuspiciousMissingCommaCheck.h [clang-tidy] Reduce false-positive ratio in misc-suspicious-missing-comma check. 2016-04-04 15:46:38 +00:00
SuspiciousSemicolonCheck.cpp [clang-tidy] Do not emit warnings from misc-suspicious-semicolon when the compilation fails. 2016-03-03 13:08:11 +00:00
SuspiciousSemicolonCheck.h [clang-tidy] Add a check to find unintended semicolons that changes the semantics. 2016-02-11 09:23:33 +00:00
SuspiciousStringCompareCheck.cpp [clang-tidy] Enhance misc-suspicious-string-compare to move down false-positives. 2016-04-26 16:53:21 +00:00
SuspiciousStringCompareCheck.h [clang-tidy] Add new checker for comparison with runtime string functions. 2016-04-21 17:19:36 +00:00
SwappedArgumentsCheck.cpp [clang-tidy] Refactor: Move misc clang-tidy checks to namespace clang::tidy::misc 2015-03-02 12:25:03 +00:00
SwappedArgumentsCheck.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
ThrowByValueCatchByReferenceCheck.cpp Add a new checker that tests whether a throw expression throws by value, and whether a catch statement catches by reference. 2015-10-09 20:42:44 +00:00
ThrowByValueCatchByReferenceCheck.h Add a new checker that tests whether a throw expression throws by value, and whether a catch statement catches by reference. 2015-10-09 20:42:44 +00:00
UndelegatedConstructor.cpp Refactors AST matching code to use the new AST matcher names. This patch correlates to r247885 which performs the AST matcher rename in Clang. 2015-09-17 13:31:25 +00:00
UndelegatedConstructor.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
UniqueptrResetReleaseCheck.cpp Refactors AST matching code to use the new AST matcher names. This patch correlates to r247885 which performs the AST matcher rename in Clang. 2015-09-17 13:31:25 +00:00
UniqueptrResetReleaseCheck.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
UnusedAliasDeclsCheck.cpp [clang-tidy] Remove unnecessary getName() on Decls and Types feeding into a DiagnosticBuilder 2016-04-07 14:55:25 +00:00
UnusedAliasDeclsCheck.h Initial version of misc-unused-using-decl check. 2016-04-19 13:48:39 +00:00
UnusedParametersCheck.cpp [clang-tidy] Remove unnecessary getName() on Decls and Types feeding into a DiagnosticBuilder 2016-04-07 14:55:25 +00:00
UnusedParametersCheck.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
UnusedRAIICheck.cpp Refactors AST matching code to use the new AST matcher names. This patch correlates to r247885 which performs the AST matcher rename in Clang. 2015-09-17 13:31:25 +00:00
UnusedRAIICheck.h [clang-tidy] Updated misc-unused-raii documentation. 2015-09-25 17:50:11 +00:00
UnusedUsingDeclsCheck.cpp clang-tidy: [misc-unused-using-decls] Support template types. 2016-04-20 09:48:56 +00:00
UnusedUsingDeclsCheck.h clang-tidy: [misc-unused-using-decls] Always use the canonical decl to 2016-04-20 08:58:27 +00:00
VirtualNearMissCheck.cpp Merge branch 'arcpatch-D16922' 2016-02-11 16:03:27 +00:00
VirtualNearMissCheck.h Merge branch 'arcpatch-D16922' 2016-02-11 16:03:27 +00:00