[PATCH] D36264: [clang-tidy] Ignore macros in make-unique check.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 4 01:37:30 PDT 2017
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 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.
The idea sounds good to me. Done.
> If warnings without fixes will be a problem in some codebases, we could then introduce the IgnoreMacros option
Didn't know there is `IgnoreMacros` option, but we are missing the option document for these checks. Will add them afterwards.
https://reviews.llvm.org/D36264
More information about the cfe-commits
mailing list