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
- Build Status
Buildable 9015 Build 9015: arc lint + arc unit
Event Timeline
LG with one comment.
clang-tidy/modernize/MakeSmartPtrCheck.cpp | ||
---|---|---|
116 | 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 | ||
---|---|---|
116 | 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 | 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 | Please add CHECK-FIXES to verify that the code remains intact (both macro definition and expansion). |
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.