nickdesaulniers added inline comments.
================ Comment at: clang/lib/Sema/SemaChecking.cpp:8107 + return true; + Pedantic |= ImplicitMatch == analyze_printf::ArgType::NoMatchPedantic; + } ---------------- At this point `ImplicitMatch` can only have the value `analyze_printf::ArgType::NoMatchPedantic` as `ArgType::MatchKind` is an enum with only 3 values (see `clang/include/clang/AST/FormatString.h`). Rather than have conditional/ternaries for each case, I think 2 conditionals are maybe simpler: ``` if (ImplicitMatch == analyze_printf::ArgType::Match) return true; else if (ImplicitMatch == analyze_printf::ArgType::NoMatchPedantic) Pedantic = true; ``` The `|=` is kind of more complicated than simple assignment. Then you don't need a block for `if (ImplicitMatch)`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits