llvm-project/clang-tools-extra/clang-tidy/misc
Mads Ravn 72bcc049f2 [clang-tidy] Add check 'misc-string-compare'.
I have a created a new check for clang tidy: misc-string-compare. This will check for incorrect usage of std::string::compare when used to check equality or inequality of string instead of the string equality or inequality operators.

Example:
```
  std::string str1, str2;
  if (str1.compare(str2)) {
  }
```

Reviewers: hokein, aaron.ballman, alexfh, malcolm.parsons

Subscribers: xazax.hun, Eugene.Zelenko, cfe-commits, malcolm.parsons, Prazek, mgorny, JDevlieghere

Differential Revision: https://reviews.llvm.org/D27210

llvm-svn: 290747
2016-12-30 10:09:46 +00:00
..
ArgumentCommentCheck.cpp modernize-use-auto NFC fixes 2016-12-14 15:29:23 +00:00
ArgumentCommentCheck.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
AssertSideEffectCheck.cpp [clang-tidy] Cleaning up language options. 2016-09-24 02:13:45 +00:00
AssertSideEffectCheck.h [clang-tidy] Cleaning namespaces to be more consistant across checkers. 2016-05-02 18:00:29 +00:00
BoolPointerImplicitConversionCheck.cpp Remove deprecated methods ast_matchers::BoundNodes::{getStmtAs,getDeclAs} 2016-12-13 16:19:19 +00:00
BoolPointerImplicitConversionCheck.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
CMakeLists.txt [clang-tidy] Add check 'misc-string-compare'. 2016-12-30 10:09:46 +00:00
DanglingHandleCheck.cpp Fix clang-tidy patterns to adapt to newly added ExprWithCleanups nodes. 2016-06-21 20:11:20 +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-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +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-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
ForwardDeclarationNamespaceCheck.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
InaccurateEraseCheck.cpp [clang-tidy] Cleaning up language options. 2016-09-24 02:13:45 +00:00
InaccurateEraseCheck.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
IncorrectRoundings.cpp Replace APFloatBase static fltSemantics data members with getter functions 2016-12-14 11:57:17 +00:00
IncorrectRoundings.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
InefficientAlgorithmCheck.cpp [clang-tidy] Cleaning up language options. 2016-09-24 02:13:45 +00:00
InefficientAlgorithmCheck.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
MacroParenthesesCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
MacroParenthesesCheck.h [clang-tidy] Cleaning namespaces to be more consistant across checkers. 2016-05-02 18:00:29 +00:00
MacroRepeatedSideEffectsCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
MacroRepeatedSideEffectsCheck.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
MiscTidyModule.cpp [clang-tidy] Add check 'misc-string-compare'. 2016-12-30 10:09:46 +00:00
MisplacedConstCheck.cpp Add the misc-misplaced-const check to clang-tidy, which diagnoses when a const-qualifier is applied to a typedef of pointer type rather than to the pointee type. 2016-06-07 17:22:47 +00:00
MisplacedConstCheck.h Add the misc-misplaced-const check to clang-tidy, which diagnoses when a const-qualifier is applied to a typedef of pointer type rather than to the pointee type. 2016-06-07 17:22:47 +00:00
MisplacedWideningCastCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
MisplacedWideningCastCheck.h [clang-tidy] Extension of checker misc-misplaced-widening-cast 2016-04-06 12:04:51 +00:00
MoveConstantArgumentCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
MoveConstantArgumentCheck.h [clang-tidy] misc-move-const-arg: Fix typos 2016-06-16 14:32:54 +00:00
MoveConstructorInitCheck.cpp [clang-tidy] Remove duplicated check from move-constructor-init 2016-12-17 20:23:14 +00:00
MoveConstructorInitCheck.h [clang-tidy] Remove duplicated check from move-constructor-init 2016-12-17 20:23:14 +00:00
MoveForwardingReferenceCheck.cpp modernize-use-auto NFC fixes 2016-12-14 15:29:23 +00:00
MoveForwardingReferenceCheck.h [clang-tidy] Add check 'misc-move-forwarding-reference' 2016-08-30 12:11:12 +00:00
MultipleStatementMacroCheck.cpp modernize-use-auto NFC fixes 2016-12-14 15:29:23 +00:00
MultipleStatementMacroCheck.h [clang-tidy] Add check misc-multiple-statement-macro 2016-04-14 21:15:57 +00:00
NewDeleteOverloadsCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
NewDeleteOverloadsCheck.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
NoexceptMoveConstructorCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
NoexceptMoveConstructorCheck.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
NonCopyableObjects.cpp [clang-tidy] Simplify matchers 2016-11-08 05:58:07 +00:00
NonCopyableObjects.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
RedundantExpressionCheck.cpp [Clang-tidy] Fix copy-paste error in misc-redundant-expression detected by PVS-Studio 2016-11-01 18:33:50 +00:00
RedundantExpressionCheck.h [clang-tidy] Enhance redundant-expression check 2016-07-07 04:03:05 +00:00
SizeofContainerCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
SizeofContainerCheck.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
SizeofExpressionCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
SizeofExpressionCheck.h Add missing override keyword to silence -Winconsistent-missing-override. NFC 2016-04-16 02:42:03 +00:00
StaticAssertCheck.cpp [clang-tidy] remove trailing whitespaces and retab 2016-08-01 12:06:18 +00:00
StaticAssertCheck.h [clang-tidy] remove trailing whitespaces and retab 2016-08-01 12:06:18 +00:00
StringCompareCheck.cpp [clang-tidy] Add check 'misc-string-compare'. 2016-12-30 10:09:46 +00:00
StringCompareCheck.h [clang-tidy] Add check 'misc-string-compare'. 2016-12-30 10:09:46 +00:00
StringConstructorCheck.cpp [clang-tidy] Add FixIt for swapping arguments in string-constructor-checker. 2016-05-11 17:32:12 +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] Cleaning up language options. 2016-09-24 02:13:45 +00:00
StringIntegerAssignmentCheck.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +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
SuspiciousEnumUsageCheck.cpp [clang-tidy] Add enum misuse check. 2016-12-27 10:07:39 +00:00
SuspiciousEnumUsageCheck.h [clang-tidy] Add enum misuse check. 2016-12-27 10:07:39 +00:00
SuspiciousMissingCommaCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
SuspiciousMissingCommaCheck.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
SuspiciousSemicolonCheck.cpp [clang-tidy] Cleanup namespace in utils folder. 2016-05-03 02:54:05 +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-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +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 Remove deprecated methods ast_matchers::BoundNodes::{getStmtAs,getDeclAs} 2016-12-13 16:19:19 +00:00
SwappedArgumentsCheck.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
ThrowByValueCatchByReferenceCheck.cpp modernize-use-auto NFC fixes 2016-12-14 15:29:23 +00:00
ThrowByValueCatchByReferenceCheck.h [clang-tidy] Cleaning namespaces to be more consistant across checkers. 2016-05-02 18:00:29 +00:00
UnconventionalAssignOperatorCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
UnconventionalAssignOperatorCheck.h Trying to fix docs. 2016-05-09 10:56:57 +00:00
UndelegatedConstructor.cpp Remove deprecated methods ast_matchers::BoundNodes::{getStmtAs,getDeclAs} 2016-12-13 16:19:19 +00:00
UndelegatedConstructor.h [clang-tidy] Update docs for clang-tidy checks. NFC 2015-08-27 18:01:58 +00:00
UniqueptrResetReleaseCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +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] Cleaning up language options. 2016-09-24 02:13:45 +00:00
UnusedAliasDeclsCheck.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
UnusedParametersCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
UnusedParametersCheck.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
UnusedRAIICheck.cpp Remove deprecated methods ast_matchers::BoundNodes::{getStmtAs,getDeclAs} 2016-12-13 16:19:19 +00:00
UnusedRAIICheck.h [clang-tidy] Updated misc-unused-raii documentation. 2015-09-25 17:50:11 +00:00
UnusedUsingDeclsCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
UnusedUsingDeclsCheck.h [clang-tidy] Ignore function context in misc-unused-using-decls. 2016-06-03 08:05:11 +00:00
UseAfterMoveCheck.cpp [clang-tidy] refactor ExprSequence out of use-after-move check 2016-12-24 12:45:07 +00:00
UseAfterMoveCheck.h [clang-tidy] Add check 'misc-use-after-move' 2016-09-14 10:29:32 +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