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

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 14 05:11:50 PDT 2017


alexfh added inline comments.


================
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
----------------
BTW, can we just remove a single token representing the parameter name? E.g. `SourceRange RemovalRange(Param->getLocation());`.


Repository:
  rL LLVM

https://reviews.llvm.org/D37846





More information about the cfe-commits mailing list