Move code shared between UnnecessaryCopyInitialization and ForRangeCopyCheck into utilities files.
Add more test cases for UnnecessaryCopyInitialization and disable fixes inside of macros.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
| clang-tidy/performance/UnnecessaryCopyInitialization.cpp | ||
|---|---|---|
| 69 ↗ | (On Diff #48607) | nit: Clang-format doesn't reflow string literals |
| clang-tidy/performance/UnnecessaryCopyInitialization.h | ||
| 19 ↗ | (On Diff #48607) | Maybe just "The check detects local variable declarations ...."? Also, should the .rst file be updated as well? |
| clang-tidy/utils/DeclRefExprUtils.h | ||
| 21 ↗ | (On Diff #48607) | nit: There should be an empty line after the brief summary, IIRC. (But you can look at the doxygen output and see how this looks like.) |
| clang-tidy/utils/FixItHintUtils.cpp | ||
| 23 ↗ | (On Diff #48607) | Lexer::getLocForEndOfToken seems to be more suitable for this purpose. |
| clang-tidy/utils/FixItHintUtils.h | ||
| 21 ↗ | (On Diff #48607) | Since this is now a library, we should make names clear and unambiguous. I'd pull a part of the name's meaning to the namespace and expand the name with the needed details. Maybe something like this: namespace clang {
namespace tidy {
namespace utils {
namespace create_fixit {
FixItHint changeVarDeclToReference(...);
FixItHint changeVarDeclToConst(...); |
| clang-tidy/utils/FixItHintUtils.cpp | ||
|---|---|---|
| 2 ↗ | (On Diff #49306) | Please fix the line break. |