hanchenye-llvm-project/clang-tools-extra/clang-tidy/misc
Alexander Kornienko 7b9f3e28cc [clang-tidy] Fixed misc-unused-parameters omitting parameters square brackets
Summary:
Bug: https://bugs.llvm.org/show_bug.cgi?id=34449

**Problem:**

Clang-tidy check misc-unused-parameters comments out parameter name omitting following characters (e.g. square brackets) what results in its complete removal. Compilation errors might occur after clang-tidy fix as well.

**Patch description:**

Changed removal range. The range should end after parameter name, not after whole parameter declarator (which might be followed by e.g. square brackets).

Reviewers: alexfh

Reviewed By: alexfh

Subscribers: JDevlieghere, xazax.hun, cfe-commits

Tags: #clang-tools-extra

Patch by Pawel Maciocha!

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

llvm-svn: 313355
2017-09-15 11:28:28 +00:00
..
ArgumentCommentCheck.cpp [clang-tidy] misc-argument-comment - extended gmock support 2017-02-07 11:39:56 +00:00
ArgumentCommentCheck.h [clang-tidy] misc-argument-comment support for gmock 2017-02-06 15:47:17 +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] check for __func__/__FUNCTION__ in lambdas 2017-06-02 17:36:32 +00:00
DanglingHandleCheck.cpp Adapt clang-tidy checks to changing semantics of hasDeclaration. 2017-08-02 13:13:11 +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] Unify the way IncludeStyle and HeaderFileExtesions options are used 2017-07-20 12:02:03 +00:00
DefinitionsInHeadersCheck.h
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
ForwardingReferenceOverloadCheck.cpp [clang-tidy] Do not dereference a null BaseType 2017-05-23 16:19:04 +00:00
ForwardingReferenceOverloadCheck.h [clang-tidy] Check for forwarding reference overload in constructors. 2017-04-06 09:56:42 +00:00
InaccurateEraseCheck.cpp Adapt clang-tidy checks to changing semantics of hasDeclaration. 2017-08-02 13:13:11 +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
LambdaFunctionNameCheck.cpp [clang-tidy] check for __func__/__FUNCTION__ in lambdas 2017-06-02 17:36:32 +00:00
LambdaFunctionNameCheck.h [clang-tidy] Add `const` to operator() to fix a warning. 2017-06-02 18:47:50 +00:00
MacroParenthesesCheck.cpp [NFC] Update function call names as changed in MacroInfo that should refer to Parameters (as opposed to Arguments). 2017-07-17 17:20:57 +00:00
MacroParenthesesCheck.h [clang-tidy] Cleaning namespaces to be more consistant across checkers. 2016-05-02 18:00:29 +00:00
MacroRepeatedSideEffectsCheck.cpp [NFC] Update function call names as changed in MacroInfo that should refer to Parameters (as opposed to Arguments). 2017-07-17 17:20:57 +00:00
MacroRepeatedSideEffectsCheck.h
MiscTidyModule.cpp [clang-tidy] check for __func__/__FUNCTION__ in lambdas 2017-06-02 17:36:32 +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-tidy] Fix 'misc-misplaced-widening-cast' assertion error. 2017-08-29 06:25:24 +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] misc-move-const-arg shouldn't complain on std::move(lambda) 2017-05-22 14:30:14 +00:00
MoveConstantArgumentCheck.h [clang-tidy] misc-move-const-arg: Fix typos 2016-06-16 14:32:54 +00:00
MoveConstructorInitCheck.cpp [clang-tidy] Unify the way IncludeStyle and HeaderFileExtesions options are used 2017-07-20 12:02:03 +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 Revert "[clang-tidy] When" -fno-exceptions is used", this warning is better to be suppressed." 2017-06-09 07:34:58 +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] Catch trivially true statements like a != 1 || a != 3 2017-03-23 15:13:54 +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] Make misc-static-assert accept assert(!"msg") 2017-06-03 10:13:55 +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] SuspiciousEnumUsageCheck bugfix 2017-09-12 09:40:13 +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] hasErrorOccurred() -> hasUncompilableErrorOccurred() 2017-02-08 16:11:22 +00:00
SuspiciousSemicolonCheck.h
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
ThrowByValueCatchByReferenceCheck.cpp [clang-tidy] Fix diag message for catch-by-value 2017-03-23 15:17:44 +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-tidy] Don't warn about call to unresolved operator* 2017-02-15 14:01:41 +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
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-tidy] Fixed misc-unused-parameters omitting parameters square brackets 2017-09-15 11:28:28 +00:00
UnusedParametersCheck.h [clang-tidy] Optimize misc-unused-parameters. NFCI 2017-05-17 02:25:11 +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-tidy] Fix misc-unused-using-decls false positives in presence of compile errors 2017-02-09 10:41:27 +00:00
UnusedUsingDeclsCheck.h [clang-tidy] Ignore function context in misc-unused-using-decls. 2016-06-03 08:05:11 +00:00
UseAfterMoveCheck.cpp Adapt clang-tidy checks to changing semantics of hasDeclaration. 2017-08-02 13:13:11 +00:00
UseAfterMoveCheck.h [clang-tidy] Add check 'misc-use-after-move' 2016-09-14 10:29:32 +00:00
VirtualNearMissCheck.cpp [clang-tidy] Don't compute the edit distance if it's over the threshold. 2017-08-09 22:09:29 +00:00
VirtualNearMissCheck.h Merge branch 'arcpatch-D16922' 2016-02-11 16:03:27 +00:00