[clang-tools-extra] [clang-tidy] Fix false positive in readability-redundant-parentheses … (PR #192827)
Daniil Dudkin via cfe-commits
cfe-commits at lists.llvm.org
Sun May 3 12:23:07 PDT 2026
https://github.com/unterumarmung requested changes to this pull request.
If this PR is meant to fix #192463, please add tests for both built-in and overloaded comparisons. The issue is about inconsistent behavior: `return (i == 0);` currently does not warn while `return (it != end);` and `return (s >= "0");` do. The test should make the intended behavior explicit instead of only covering member access.
Please add coverage for C++ cases that can affect the AST shape here, especially templates and dependent expressions. For example, test member access through `(*it).x` / `(*it)->x` inside a function template, and consider const-qualified/member-call cases that introduce implicit casts or temporary materialization. This matcher walks through implicit nodes, so those cases should be locked down.
https://github.com/llvm/llvm-project/pull/192827
More information about the cfe-commits
mailing list