https://github.com/mirimmad created https://github.com/llvm/llvm-project/pull/187054
Fixes #186749 >From 6c083f9ec004bc054829fd1cc8df9b9de4a408f4 Mon Sep 17 00:00:00 2001 From: Immad Mir <[email protected]> Date: Tue, 17 Mar 2026 21:57:00 +0530 Subject: [PATCH] match against 'memberExpr' --- .../clang-tidy/readability/RedundantParenthesesCheck.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clang-tools-extra/clang-tidy/readability/RedundantParenthesesCheck.cpp b/clang-tools-extra/clang-tidy/readability/RedundantParenthesesCheck.cpp index bb993a60c9d4e..38cca7790670a 100644 --- a/clang-tools-extra/clang-tidy/readability/RedundantParenthesesCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/RedundantParenthesesCheck.cpp @@ -54,7 +54,11 @@ void RedundantParenthesesCheck::registerMatchers(MatchFinder *Finder) { parenExpr(subExpr(anyOf( parenExpr(), ConstantExpr, declRefExpr(to(namedDecl(unless( - matchers::matchesAnyListedRegexName(AllowedDecls))))))), + matchers::matchesAnyListedRegexName(AllowedDecls))))), + memberExpr() + + )), + unless(anyOf(isInMacro(), // sizeof(...) is common used. hasParent(unaryExprOrTypeTraitExpr())))) _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
