30 const FunctionTypeLoc TL = [&] {
31 if (
const auto *TL = Result.Nodes.getNodeAs<FunctionTypeLoc>(
"fn"))
33 return Result.Nodes.getNodeAs<LambdaExpr>(
"fn")
35 ->getFunctionTypeLoc();
38 if (TL.getNumParams() != 0)
42 Result.SourceManager->getSpellingLoc(TL.getLParenLoc()),
43 *Result.SourceManager, getLangOpts());
45 if (!Tok || Tok->isNot(tok::raw_identifier) ||
46 Tok->getRawIdentifier() !=
"void")
49 diag(Tok->getLocation(),
"redundant void argument list")
50 << FixItHint::CreateRemoval(Tok->getLocation());