[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8bfc14193170: [clang-tidy] Added option to uniqueptr delete release check (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 327258. njames93 added a comment. Add test demonstrating we aren't detecting bound member functions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97630/new/ https://reviews.llvm.org/D97630 Files: clang-too

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-uniqueptr-delete-release.cpp:40 + + delete (P2.release()); + // CHECK-MESSAGES-NULLPTR: :[[@LINE-1]]:3: warning: prefer '= nullptr' aaron.ballman wrote: > njames

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-03-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-uniqueptr-delete-release.cpp:40 + + delete (P2.release()); + // CHECK-MESSAGES-NULLPTR: :[[@LINE-1]]:3: warning: prefer '= nullptr' njames93 wrote: > aaron.

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-uniqueptr-delete-release.cpp:40 + + delete (P2.release()); + // CHECK-MESSAGES-NULLPTR: :[[@LINE-1]]:3: warning: prefer '= nullptr' aaron.ballman wrote: > Not th

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-03-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-uniqueptr-delete-release.cpp:40 + + delete (P2.release()); + // CHECK-MESSAGES-NULLP

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 327077. njames93 added a comment. Add tests to ensure Parens are handled correctly. Add support for pointers to and smart pointers to unique_ptr objects. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97630/new/

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 326977. njames93 marked an inline comment as done. njames93 added a comment. Use single back ticks for option values. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97630/new/ https://reviews.llvm.org/D97630 F

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. @Eugene.Zelenko I think there should be a herald rule for marking projects as clang-tools-extra automatically Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97630/new/ https://reviews.llvm.org/D97630 _

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-02-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-uniqueptr-delete-release.rst:24 + + If ``true``, refactor by calling the reset member function instead of + assigning to ``nullptr``. Default value is ``false``.

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 326972. njames93 added a comment. Clean up some fix-it logic Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97630/new/ https://reviews.llvm.org/D97630 Files: clang-tools-extra/clang-tidy/readability/Uniquept

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, gribozavr2. Herald added a subscriber: xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Adds an option, `PreferResetCall`, currently default