The check doesn't fully support smart-ptr usages inside macros, which
may cause incorrect fixes, or even crashes, ignore them for now.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
LG with one comment.
clang-tidy/modernize/MakeSmartPtrCheck.cpp | ||
---|---|---|
114 ↗ | (On Diff #109520) | Seems to be a bit too broad. Maybe just disable the fix in macros? If warnings without fixes will be a problem in some codebases, we could then introduce the IgnoreMacros option as in readability-redundant-declaration, modernize-use-using, modernize-use-bool-literals, and modernize-use-default-member-init. |
Please take another look.
clang-tidy/modernize/MakeSmartPtrCheck.cpp | ||
---|---|---|
114 ↗ | (On Diff #109520) | The idea sounds good to me. Done.
Didn't know there is IgnoreMacros option, but we are missing the option document for these checks. Will add them afterwards. |
LG with a couple of nits.
clang-tidy/modernize/MakeSmartPtrCheck.cpp | ||
---|---|---|
54 ↗ | (On Diff #109691) | Let's go with getLocalOrGlobal to be able to set the option for all checks at once. Other checks having this option do this already. |
test/clang-tidy/modernize-make-unique-macros.cpp | ||
14 ↗ | (On Diff #109691) | Please add CHECK-FIXES to verify that the code remains intact (both macro definition and expansion). |