summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/redundant-smartptr-get.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] Bring order to check registration.Alexander Kornienko2014-10-261-129/+0
| | | | | | | | | | | | | | | | Summary: Register readability checks in a separate module. Renamed the checks and test file names accordingly. Reviewers: djasper, klimek Reviewed By: klimek Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D5936 llvm-svn: 220631
* Fixed compilation errors in tests, enforce checking for errors in ↵Alexander Kornienko2014-07-121-2/+4
| | | | | | | | | | | | | | check_clang_tidy_fix.sh. Reviewers: sbenza, djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4480 llvm-svn: 212876
* Modify the tests to use FileCheck -implicit-check-not option being proposed ↵Alexander Kornienko2014-07-111-4/+0
| | | | | | | | | | | | | | in D4462 Reviewers: djasper, sbenza, bkramer Reviewed By: bkramer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4463 llvm-svn: 212814
* Removed the "-fix" suffix from tests that verify both fixes and messages.Alexander Kornienko2014-07-091-0/+131
| | | | llvm-svn: 212658
* Check messages and fixes in the same test.Alexander Kornienko2014-07-091-107/+0
| | | | | | | | | | | | | | Summary: This reduces duplication of test code and improves locality of checks. Reviewers: sbenza, djasper Reviewed By: sbenza, djasper Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4437 llvm-svn: 212653
* Never filter-out compile errors in clang-tidy, display them as errors.Alexander Kornienko2014-06-021-2/+3
| | | | | | | | | | | | | | | | | | Summary: No filters should affect the display of errors. Fixed a few tests, which had compile errors. We need to think what we should do with mapped errors (-Werror). Reviewers: klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3982 llvm-svn: 210044
* Print stats on displayed and ignored warnings.Alexander Kornienko2014-05-071-1/+1
| | | | | | | | | | | | | | | | Summary: Also displays a hint to use -header-filter='.*' in case any warnings are in non-user code. This will help discoverability of this option. Reviewers: klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3621 llvm-svn: 208174
* Do not touch get() calls on 'this' object.Samuel Benzaquen2014-04-291-0/+10
| | | | | | | | | | | | | | | | Summary: These calls are part of the implementation of the smart pointer itself and chaning it is likely to be wrong. Example: T& operator*() const { return *get(); } Reviewers: djasper Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3540 llvm-svn: 207525
* test/clang-tidy/redundant-smartptr-get*.cpp: Both of them really require shell.NAKAMURA Takumi2014-04-101-0/+1
| | | | llvm-svn: 205951
* Inject unique_ptr/shared_ptr into the test instead of using <memory>Samuel Benzaquen2014-04-091-1/+17
| | | | | | | | | | | | | | | Summary: Inject unique_ptr/shared_ptr into the test instead of using <memory> Libraries might not be present on tests. This fixes the break introduces at rL205854. Reviewers: klimek CC: cfe-commits Differential Revision: http://reviews.llvm.org/D3330 llvm-svn: 205913
* Extend the check to detect patterns like 'ptr.get() == nullptr'Samuel Benzaquen2014-04-091-16/+15
| | | | | | | | | | | | | | | | | Summary: Extend the check to detect patterns like 'ptr.get() == nullptr' It detects == and != when any argument is a ptr.get() and the other is a nullptr. Only supports standard smart pointer types std::unique_ptr and std::shared_ptr. Does not support the case 'ptr.get() == other.get()' yet. Reviewers: djasper CC: cfe-commits, alexfh Differential Revision: http://llvm-reviews.chandlerc.com/D3294 llvm-svn: 205854
* Add clang-tidy check to remove redundant .get() calls on smart pointers.Samuel Benzaquen2014-03-271-0/+80
Summary: This check finds and removes redundant .get() calls on smart pointers. Example: ptr.get()->Foo() ==> ptr->Foo() Reviewers: alexfh CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3186 llvm-svn: 204947
OpenPOWER on IntegriCloud