[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)
Congcong Cai via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 20 08:02:43 PDT 2024
================
@@ -38,7 +38,9 @@ AST_MATCHER(Type, sugaredNullptrType) {
StatementMatcher makeCastSequenceMatcher(llvm::ArrayRef<StringRef> NameList) {
auto ImplicitCastToNull = implicitCastExpr(
anyOf(hasCastKind(CK_NullToPointer), hasCastKind(CK_NullToMemberPointer)),
- unless(hasImplicitDestinationType(qualType(substTemplateTypeParmType()))),
+ anyOf(hasSourceExpression(gnuNullExpr()),
----------------
HerrCai0907 wrote:
I agree the current solution, could you add some comment TODO or FIXME to simplify troubleshooting when this issue is reported。
https://github.com/llvm/llvm-project/pull/109169
More information about the cfe-commits
mailing list