nickdesaulniers added inline comments.
================ Comment at: clang/test/Sema/warn-fortify-source.c:100-102 + __builtin_snprintf(buf, 2, "%#x", n); + __builtin_snprintf(buf, 2, "%#X", n); + __builtin_snprintf(buf, 2, "%#o", n); ---------------- Note that GCC -Wformat-truncation can warn on some of these. https://godbolt.org/z/jE3axWe1W Looks like the diagnostic keeps an up and lower bounds on the estimated format string expansion. Trunk for Clang also warns for these, so is this change a regression? Or are both GCC and Clang (trunk) incorrect? ================ Comment at: clang/test/Sema/warn-fortify-source.c:121-123 + __builtin_vsnprintf(buf, 2, "%#x", list); + __builtin_vsnprintf(buf, 2, "%#X", list); + __builtin_vsnprintf(buf, 2, "%#o", list); ---------------- Clang @ trunk and GCC both warn for these 3. Regression? https://godbolt.org/z/j551hTE5E CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159138/new/ https://reviews.llvm.org/D159138 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits