summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fixed: Duck-typing in readability-redundant-smartptr-get didn't catch MSVC ↵Florian Gross2019-05-021-13/+16
| | | | | | | | STL smart pointers. Differential Revision: https://reviews.llvm.org/D61209 llvm-svn: 359801
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [clang-tidy] add IgnoreMacros option to readability-redundant-smartptr-getMiklos Vajna2018-10-211-0/+8
| | | | | | | | | | | | | And also enable it by default to be consistent with e.g. modernize-use-using. This helps e.g. when running this check on client code where the macro is provided by the system, so there is no easy way to modify it. Reviewed By: JonasToth Differential Revision: https://reviews.llvm.org/D53454 llvm-svn: 344871
* Port getLocStart -> getBeginLocStephen Kelly2018-08-091-1/+1
| | | | | | | | | | Reviewers: javed.absar Subscribers: nemanjai, kbarton, ilya-biryukov, ioeric, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50354 llvm-svn: 339400
* [clang-tidy] Expand readability-redundant-smartptr-get to understand ↵Samuel Benzaquen2018-01-151-5/+14
| | | | | | | | | | | | | | implicit converions to bool in more contexts. Summary: Expand readability-redundant-smartptr-get to understand implicit converions to bool in more contexts. Reviewers: hokein Subscribers: klimek, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D41998 llvm-svn: 322497
* modernize-use-auto NFC fixesPiotr Padlewski2016-12-141-2/+2
| | | | llvm-svn: 289656
* [clang-tidy] make readability-redundant-smartptr-get report get() usage in ↵Kirill Bobyrev2016-09-261-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | conditions This patch extends clang-tidy's readability-redundant-smartptr-get to produce warnings for previously unsupported cases: ``` std::unique_ptr<void> ptr; if (ptr.get()) if (ptr.get() == NULL) if (ptr.get() != NULL) ``` This is intended to fix https://llvm.org/bugs/show_bug.cgi?id=25804, a bug report opened by @Eugene.Zelenko. However, there still are cases not detected by the check. They can be found in `void Negative()` function defined in test/clang-tidy/readability-redundant-smartptr-get.cpp. Reviewers: alexfh Differential Revision: https://reviews.llvm.org/D24893 llvm-svn: 282386
* Revert r282382; it had no reference to Revision.Kirill Bobyrev2016-09-261-18/+11
| | | | llvm-svn: 282384
* [clang-tidy] make readability-redundant-smartptr-get report get() usage in ↵Kirill Bobyrev2016-09-261-11/+18
| | | | | | | | | | | | | | | | | | | | | | | conditions This patch extends clang-tidy's readability-redundant-smartptr-get to produce warnings for previously unsupported cases: ``` std::unique_ptr<void> ptr; if (ptr.get()) if (ptr.get() == NULL) if (ptr.get() != NULL) ``` This is intended to fix https://llvm.org/bugs/show_bug.cgi?id=25804, a bug report opened by @Eugene.Zelenko. However, there still are cases not detected by the check. They can be found in `void Negative()` function defined in test/clang-tidy/readability-redundant-smartptr-get.cpp. llvm-svn: 282382
* [clang-tidy] Cleaning up language options.Gabor Horvath2016-09-241-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D24881 llvm-svn: 282319
* Apply performance-unnecessary-value-param to clang-tidy.Benjamin Kramer2016-06-151-1/+1
| | | | | | With minor manual tweaks. No functionality change intended. llvm-svn: 272795
* [clang-tidy] Match the type against the get() method we are calling,Samuel Benzaquen2016-02-171-5/+5
| | | | | | | | | instead of a get() method we find in the class. The duck typed smart pointer class could have overloaded get() methods and we should only skip the one that matches. llvm-svn: 261102
* [clang-tidy] Use proper capitalization and punctuation for diagnostic messages.Alexander Kornienko2016-01-081-1/+1
| | | | | | Use diagnostic parameters where possible instead of string concatenation. llvm-svn: 257176
* Refactors AST matching code to use the new AST matcher names. This patch ↵Aaron Ballman2015-09-171-14/+17
| | | | | | correlates to r247885 which performs the AST matcher rename in Clang. llvm-svn: 247886
* Disable clang-tidy readability checkers when not compiling in C++ mode. None ↵Aaron Ballman2015-09-021-0/+5
| | | | | | of the checkers require additional testing as the tests will not compile for other languages or modes, or the checkers would never match a valid construct. llvm-svn: 246661
* [clang-tidy] Refactor: Rename clang-tidy readability check files and classes ↵Alexander Kornienko2015-03-091-0/+123
to follow naming conventions Classes are named WhateverCheck, files are WhateverCheck.cpp and` WhateverCheck.h` http://reviews.llvm.org/D8144 Patch by Richard Thomson! llvm-svn: 231650
OpenPOWER on IntegriCloud