[PATCH] D36264: [clang-tidy] Ignore macros in make-unique check.

2017-08-04 Thread Haojian Wu via Phabricator via cfe-commits
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

[PATCH] D36264: [clang-tidy] Ignore macros in make-unique check.

2017-08-04 Thread Haojian Wu via Phabricator via cfe-commits
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

[PATCH] D36264: [clang-tidy] Ignore macros in make-unique check.

2017-08-04 Thread Alexander Kornienko via Phabricator via cfe-commits
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)) {}

[PATCH] D36264: [clang-tidy] Ignore macros in make-unique check.

2017-08-04 Thread Haojian Wu via Phabricator via cfe-commits
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

[PATCH] D36264: [clang-tidy] Ignore macros in make-unique check.

2017-08-04 Thread Haojian Wu via Phabricator via cfe-commits
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

[PATCH] D36264: [clang-tidy] Ignore macros in make-unique check.

2017-08-04 Thread Haojian Wu via Phabricator via cfe-commits
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

[PATCH] D36264: [clang-tidy] Ignore macros in make-unique check.

2017-08-03 Thread Alexander Kornienko via Phabricator via cfe-commits
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

[PATCH] D36264: [clang-tidy] Ignore macros in make-unique check.

2017-08-03 Thread Haojian Wu via Phabricator via cfe-commits
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