[PATCH] D25316: [clang-tidy] Enhance modernize-use-auto to casts
Malcolm Parsons via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 31 10:15:11 PDT 2016
malcolm.parsons added inline comments.
================
Comment at: clang-tidy/modernize/UseAutoCheck.cpp:404
+ [](const Expr *Expr) { return Expr->getType(); },
+ "use auto when initializing with new to avoid "
+ "duplicating the type name");
----------------
aaron.ballman wrote:
> Quote use of `auto` and `new` in the diagnostic since they're syntax rather than english.
A lot of clang-tidy diagnostics don't quote syntax/functions/types:
```
"do not use reinterpret_cast"
"pass by value and use std::move"
"use nullptr"
"the shrink_to_fit method should be used "
"use std::move to transfer ownership"
"auto_ptr is deprecated, use unique_ptr instead"
"use auto when declaring iterators"
"use range-based for loop instead"
"use emplace_back instead of push_back"
"prefer a lambda to std::bind"
...
```
Repository:
rL LLVM
https://reviews.llvm.org/D25316
More information about the cfe-commits
mailing list