PiotrZSL added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/utils/ExprSequence.cpp:67 +llvm::SmallVector<const InitListExpr *> +allInitListExprForms(const InitListExpr *InitList) { + llvm::SmallVector<const InitListExpr *> result = {InitList}; ---------------- maybe some other name instead of allInitListExprForms, like getAllInitForms ================ Comment at: clang-tools-extra/clang-tidy/utils/ExprSequence.cpp:69-72 + if (InitList->isSemanticForm() && InitList->getSyntacticForm()) + result.push_back(InitList->getSyntacticForm()); + if (InitList->isSyntacticForm() && InitList->getSemanticForm()) + result.push_back(InitList->getSemanticForm()); ---------------- this looks like typo... but it isn't, it's just unnecessary. ``InitList->isSemanticForm() && InitList->getSyntacticForm()`` is equal to: ``AltForm.getInt() && AltForm.getPointer()`` ``InitList->isSyntacticForm() && InitList->getSemanticForm()`` is equal to: ``(!AltForm.getInt() || !AltForm.getPointer()) && (!AltForm.getInt()) && AltForm.getPointer()`` Why we coudn't have "getAnyForm". any code could just look like this: ``if (const InitListExpr * Form = InitList->getSyntacticForm())`` `` result.push_back(Form);`` ``if (const InitListExpr * Form = InitList->getSemanticForm())`` `` result.push_back(Form);`` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145906/new/ https://reviews.llvm.org/D145906 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits