diff options
author | Kirill Bobyrev <omtcyfz@gmail.com> | 2016-09-26 06:22:54 +0000 |
---|---|---|
committer | Kirill Bobyrev <omtcyfz@gmail.com> | 2016-09-26 06:22:54 +0000 |
commit | 6c9e06a95c0a6cb3d8a80a3af18332326501e8a8 (patch) | |
tree | 90334960e33a1817255488b2200232c29958d815 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | d7a5ed414140ff2a7d85cf8613b2b43a16511256 (diff) | |
download | llvm-6c9e06a95c0a6cb3d8a80a3af18332326501e8a8.zip llvm-6c9e06a95c0a6cb3d8a80a3af18332326501e8a8.tar.gz llvm-6c9e06a95c0a6cb3d8a80a3af18332326501e8a8.tar.bz2 |
[clang-tidy] make readability-redundant-smartptr-get report get() usage in 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
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions