aaron.ballman added inline comments.
================
Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:74
+ if (Construct) {
+ checkConstruct(SM, Construct, Type, New);
----------------
Can elide the braces for the `if` and `else`.
================
Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:147
+ CharSourceRange::getCharRange(OperatorLoc, ExprEnd),
+ " = " + makeSmartPtrFunctionName + "<" +
+ New->getAllocatedType().getAsString(getLangOpts()) + ">");
----------------
I kind of wonder if this should be using `Twine` to avoid a lot of extra
allocations and copies.
================
Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:150
+
+ if (Expr->isArrow()) {
+ Diag << FixItHint::CreateInsertion(ExprStart, "*");
----------------
Elide braces
https://reviews.llvm.org/D25898
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits