================
@@ -74,8 +74,9 @@ RewriteRuleWith<std::string> StringviewNullptrCheckImpl() {
auto BasicStringViewConstructingFromNullExpr =
cxxConstructExpr(
HasBasicStringViewType, argumentCountIs(1),
- hasAnyArgument(/* `hasArgument` would skip over parens */ anyOf(
- NullLiteral, NullInitList, EmptyInitList)),
+ hasAnyArgument(
+ /* `hasArgument` would skip over parens */ ignoringParenImpCasts(
+ anyOf(NullLiteral, NullInitList, EmptyInitList))),
----------------
5chmidti wrote:
Checkout this file later for this and the other section I highlighted, here it
looks like the only reason that `hasAnyArgument` was chosen is because of this
differing behavior, instead, this can be replaced with `hasArgument(0, ...)`
after the `IgnoreParenImpCasts` is removed from the `hasArgument` matcher.
https://github.com/llvm/llvm-project/pull/89509
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits