JonasToth added a comment. just my 2 cents
================ Comment at: clang-tools-extra/clang-tidy/readability/UseEarlyExitsCheck.cpp:66 + if (needsParensAfterUnaryNegation(Condition)) { + Diag << FixItHint::CreateInsertion(Condition->getBeginLoc(), "!(") + << FixItHint::CreateInsertion( ---------------- did you consider comma expressions? `if (myDirtyCode(), myCondition && yourCondition)`. It seems to me, that the transformation would be incorrect. ================ Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/use-early-exits.rst:55 + + If `true`, split up conditions with cunjunctions (``&&``) into multiple + ``if`` statements. Default value is `false`. ---------------- typo `cunjunctions -> conjunctions` ================ Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/use-early-exits.rst:63 + void Process(bool A, bool B) { + if (A && B) { + // Long processing. ---------------- if this option is false, the transformation would be `if(!(A && B))`, right? should demorgan rules be applied or at least be mentioned here? I think transforming to `if (!A || !B)` is at least a viable option for enough users. ================ Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/use-early-exits.rst:112 + + If `true`, the check will only report ifs which contain nested control blocks. + Default value is `false` ---------------- maybe highlight the `if` as code with double quotes? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130181/new/ https://reviews.llvm.org/D130181 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits