aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land.
Aside from some minor commenting nits, LGTM ================ Comment at: clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp:41 + switchStmt(hasCondition(allOf( + // Match on switch statements that have either bitfield or integer + // condition. ---------------- aaron.ballman wrote: > either bitfield or integer condition -> either a bit-field or an integer > condition bitfield -> bit-field ================ Comment at: clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp:91-92 + // Context.getTypeSize(T) returns the number of bits T uses. + // Calculates the number of discrete values that are representable by this + // type. + return T->isIntegralType(Context) ? twoPow(Context.getTypeSize(T)) ---------------- JonasToth wrote: > aaron.ballman wrote: > > I don't think this comment adds value. > i dropped all of it. The function doc should be clear enough, is it? Yes, I think so. ================ Comment at: clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp:168 + return twoPow(BitfieldDecl->getBitWidthValue(*Result.Context)); + llvm_unreachable("either bitfield or non-enum must be condition"); + }(); ---------------- bitfield -> bit-field https://reviews.llvm.org/D37808 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits