misc-unused-parameters: Fix handling of parameters in template functions.
authorDaniel Jasper <djasper@google.com>
Wed, 22 Jul 2015 17:30:35 +0000 (17:30 +0000)
committerDaniel Jasper <djasper@google.com>
Wed, 22 Jul 2015 17:30:35 +0000 (17:30 +0000)
commit9b46e9c5de19f91c4b6b8b1d3405875c48190aac
treeb2e9e12f77e4ad64909eb0c78562c4a930095a8a
parent2c674d347e067b865390db50cafd035ad2c5f4c7
misc-unused-parameters: Fix handling of parameters in template functions.

The parameters of the function templates were being marked as
incorrectly be marked as unused. Added a test for this and changed the
check to use the same

  isReferenced() || !getDeclName()

logic as Sema::DiagnoseUnusedParameters.
Patch Scott Wallace, thank you!

llvm-svn: 242912
clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp
clang-tools-extra/test/clang-tidy/misc-unused-parameters.cpp