[PATCH] D36264: [clang-tidy] Ignore macros in make-unique check.
Alexander Kornienko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 3 07:36:55 PDT 2017
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())
checkConstruct(SM, Construct, Type, New);
----------------
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.
https://reviews.llvm.org/D36264
More information about the cfe-commits
mailing list