alexfh added a comment. Please mark all addressed comments "Done".
================ Comment at: clang-tidy/modernize/ReturnBracedInitListCheck.cpp:60 + // Make sure that the return type matches the constructed type. + const QualType returnType = + MatchedFunctionDecl->getReturnType().getCanonicalType(); ---------------- Please follow LLVM naming conventions (variables should StartWithUpperCase). ================ Comment at: clang-tidy/modernize/ReturnBracedInitListCheck.cpp:72 + for (Decl *D : + MatchedConstructExpr->getConstructor()->getAsFunction()->decls()) { + if (const auto *VD = dyn_cast<VarDecl>(D)) { ---------------- 1. `getAsFunction()` is not needed, `CXXConstructorDecl` derives from `FunctionDecl` 2. A simple loop from `0` to `getNumParams() ` would make it easier to see that the code is correct 3. s/i/I/ ================ Comment at: clang-tidy/modernize/ReturnBracedInitListCheck.cpp:93 + << FixItHint::CreateReplacement( + CharSourceRange::getTokenRange(CallParensRange.getBegin(), + CallParensRange.getBegin()), ---------------- `SourceRange` is implicitly constructible from `SourceLocation`, so you need to supply the same location twice. Same below. Repository: rL LLVM https://reviews.llvm.org/D28768 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits