This revision was automatically updated to reflect the committed changes.
Closed by commit rL310050: [clang-tidy] Ignore macros in make-unique check.
(authored by hokein).
Repository:
rL LLVM
https://reviews.llvm.org/D36264
Files:
clang-tools-extra/trunk/clang-tidy/modernize/MakeSmartPtrChe
hokein updated this revision to Diff 109701.
hokein marked 2 inline comments as done.
hokein added a comment.
Address review comments.
https://reviews.llvm.org/D36264
Files:
clang-tidy/modernize/MakeSmartPtrCheck.cpp
clang-tidy/modernize/MakeSmartPtrCheck.h
docs/clang-tidy/checks/moderniz
alexfh accepted this revision.
alexfh added a comment.
LG with a couple of nits.
Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:54
+ Options.get("MakeSmartPtrFunction", MakeSmartPtrFunctionName)),
+ IgnoreMacros(Options.get("IgnoreMacros", true)) {}
hokein added a comment.
Please take another look.
Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:114
- if (Construct)
+ if (Construct && !Construct->getLocation().isMacroID())
checkConstruct(SM, Construct, Type, New);
alexfh wrote:
> Seems to b
hokein updated this revision to Diff 109691.
hokein marked an inline comment as done.
hokein added a comment.
Add a missing test file.
https://reviews.llvm.org/D36264
Files:
clang-tidy/modernize/MakeSmartPtrCheck.cpp
clang-tidy/modernize/MakeSmartPtrCheck.h
docs/clang-tidy/checks/moderniz
hokein updated this revision to Diff 109690.
hokein added a comment.
Add IgnoreMacros option.
https://reviews.llvm.org/D36264
Files:
clang-tidy/modernize/MakeSmartPtrCheck.cpp
clang-tidy/modernize/MakeSmartPtrCheck.h
docs/clang-tidy/checks/modernize-make-unique.rst
test/clang-tidy/moder
alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.
LG with one comment.
Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:114
- if (Construct)
+ if (Construct && !Construct->getLocation().isMacroID())
checkConst
hokein created this revision.
Herald added subscribers: xazax.hun, JDevlieghere.
The check doesn't fully support smart-ptr usages inside macros, which
may cause incorrect fixes, or even crashes, ignore them for now.
https://reviews.llvm.org/D36264
Files:
clang-tidy/modernize/MakeSmartPtrCheck