[PATCH] D37846: [clang-tidy] Fixed misc-unused-parameters omitting parameters square brackets

Pawel Maciocha via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 14 05:51:51 PDT 2017


PriMee added a comment.

Diff will be updated as soon as possible.



================
Comment at: clang-tidy/misc/UnusedParametersCheck.cpp:141
       !Indexer->getOtherRefs(Function).empty() || isOverrideMethod(Function)) {
-    SourceRange RemovalRange(Param->getLocation(),
-                             Param->DeclaratorDecl::getSourceRange().getEnd());
+    SourceRange RemovalRange(Param->getLocation(), Param->Decl::getLocation());
     // Note: We always add a space before the '/*' to not accidentally create a
----------------
alexfh wrote:
> BTW, can we just remove a single token representing the parameter name? E.g. `SourceRange RemovalRange(Param->getLocation());`.
Yes, you're right :)


Repository:
  rL LLVM

https://reviews.llvm.org/D37846





More information about the cfe-commits mailing list