hanchenye-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
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
DanglingHandleCheck.h
DefinitionsInHeadersCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
DefinitionsInHeadersCheck.h
FoldInitTypeCheck.cpp
FoldInitTypeCheck.h
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
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
MacroParenthesesCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
MacroParenthesesCheck.h
MacroRepeatedSideEffectsCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
MacroRepeatedSideEffectsCheck.h
MiscTidyModule.cpp [clang-tidy] Add check 'misc-string-compare'. 2016-12-30 10:09:46 +00:00
MisplacedConstCheck.cpp
MisplacedConstCheck.h
MisplacedWideningCastCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
MisplacedWideningCastCheck.h
MoveConstantArgumentCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
MoveConstantArgumentCheck.h
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
MultipleStatementMacroCheck.cpp modernize-use-auto NFC fixes 2016-12-14 15:29:23 +00:00
MultipleStatementMacroCheck.h
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
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
StaticAssertCheck.cpp
StaticAssertCheck.h
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
StringConstructorCheck.h
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
StringLiteralWithEmbeddedNulCheck.h
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
SuspiciousSemicolonCheck.h
SuspiciousStringCompareCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
SuspiciousStringCompareCheck.h
SwappedArgumentsCheck.cpp Remove deprecated methods ast_matchers::BoundNodes::{getStmtAs,getDeclAs} 2016-12-13 16:19:19 +00:00
SwappedArgumentsCheck.h
ThrowByValueCatchByReferenceCheck.cpp modernize-use-auto NFC fixes 2016-12-14 15:29:23 +00:00
ThrowByValueCatchByReferenceCheck.h
UnconventionalAssignOperatorCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
UnconventionalAssignOperatorCheck.h
UndelegatedConstructor.cpp Remove deprecated methods ast_matchers::BoundNodes::{getStmtAs,getDeclAs} 2016-12-13 16:19:19 +00:00
UndelegatedConstructor.h
UniqueptrResetReleaseCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
UniqueptrResetReleaseCheck.h
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
UnusedUsingDeclsCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
UnusedUsingDeclsCheck.h
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
VirtualNearMissCheck.h