================
@@ -209,7 +209,7 @@ void ContainerSizeEmptyCheck::registerMatchers(MatchFinder
*Finder) {
const auto WrongComparend =
anyOf(stringLiteral(hasSize(0)),
userDefinedLiteral(hasLiteral(stringLiteral(hasSize(0)))),
- cxxConstructExpr(argumentCountIs(0)),
+ cxxConstructExpr(argumentCountIs(0), hasType(ValidContainer)),
----------------
5chmidti wrote:
This still allows comparing two different valid containers though.
```c++
std::string a{"abc"};
a == std::vector<char>{};
```
I think we should use `equalsBoundNode`
https://github.com/llvm/llvm-project/pull/190535
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits