Index: clang-tidy/modernize/RedundantVoidArgCheck.cpp =================================================================== --- clang-tidy/modernize/RedundantVoidArgCheck.cpp +++ clang-tidy/modernize/RedundantVoidArgCheck.cpp @@ -237,7 +237,13 @@ Lambda->hasExplicitParameters()) { SourceLocation Begin = Lambda->getIntroducerRange().getEnd().getLocWithOffset(1); - SourceLocation End = Lambda->getBody()->getLocStart().getLocWithOffset(-1); + SourceLocation End = + Lambda->getBody()->getLocStart().isMacroID() + ? Result.SourceManager + ->getImmediateExpansionRange(Lambda->getBody()->getLocStart()) + .getBegin() + .getLocWithOffset(-1) + : Lambda->getBody()->getLocStart().getLocWithOffset(-1); removeVoidArgumentTokens(Result, SourceRange(Begin, End), "lambda expression"); } Index: test/clang-tidy/modernize-redundant-void-arg.cpp =================================================================== --- test/clang-tidy/modernize-redundant-void-arg.cpp +++ test/clang-tidy/modernize-redundant-void-arg.cpp @@ -445,3 +445,10 @@ // CHECK-MESSAGES: :[[@LINE-1]]:24: warning: {{.*}} in function definition // CHECK-FIXES: DefinitionWithNoBody() = delete; }; + +#define BODY {} +void foo_lamb(){ + [](void)BODY; + // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: redundant void argument list in lambda expression [modernize-redundant-void-arg] + // CHECK-FIXES: []()BODY; +}