Index: clang-tidy/google/NamedParameterCheck.cpp =================================================================== --- clang-tidy/google/NamedParameterCheck.cpp +++ clang-tidy/google/NamedParameterCheck.cpp @@ -60,6 +60,11 @@ !SM.isWrittenInSameFile(Parm->getLocStart(), Parm->getLocation())) continue; + // Skip gmock testing::Unused parameters. + if (auto Typedef = Parm->getType()->getAs()) + if (Typedef->getDecl()->getQualifiedNameAsString() == "testing::Unused") + continue; + // Look for comments. We explicitly want to allow idioms like // void foo(int /*unused*/) const char *Begin = SM.getCharacterData(Parm->getLocStart()); Index: test/clang-tidy/google-readability-function.cpp =================================================================== --- test/clang-tidy/google-readability-function.cpp +++ test/clang-tidy/google-readability-function.cpp @@ -103,3 +103,22 @@ Z &operator--(Z&, int) {} // CHECK-MESSAGES: :[[@LINE-1]]:17: warning: all parameters should be named in a function // CHECK-FIXES: Z &operator--(Z& /*unused*/, int) {} + +namespace testing { +namespace internal { +class IgnoredValue { + public: + template + IgnoredValue(const T& /* ignored */) {} +}; +} +typedef internal::IgnoredValue Unused; +} + +using ::testing::Unused; + +void MockFunction(Unused, int q, Unused) { + ++q; + ++q; + ++q; +}