[all-commits] [llvm/llvm-project] 7dc410: [clang-tidy] Fix a regression of readability-conta...
Haojian Wu via All-commits
all-commits at lists.llvm.org
Mon Aug 8 05:41:07 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7dc410cbff28270fcfcf7f2dd80f57ead7ab7d18
https://github.com/llvm/llvm-project/commit/7dc410cbff28270fcfcf7f2dd80f57ead7ab7d18
Author: Haojian Wu <hokein.wu at gmail.com>
Date: 2022-08-08 (Mon, 08 Aug 2022)
Changed paths:
M clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp
M clang-tools-extra/test/clang-tidy/checkers/readability/container-size-empty.cpp
Log Message:
-----------
[clang-tidy] Fix a regression of readability-container-size-empty after the AST ElaboratedType change.
With 15f3cd6bfc670ba6106184a903eb04be059e5977, we no longer emit a
diagnostic on a real std::vector case where the size method returns a
sugar `size_type`. This patch fixes it.
```
std::vector<int> v;
if (v.size() == 0) // => no check diagnostics
;
```
Differential Revision: https://reviews.llvm.org/D131390
More information about the All-commits
mailing list