meikeb marked 6 inline comments as done. meikeb added a comment. Thanks for taking the time and doing these great reviews! Really appreciated!
================ Comment at: lib/Sema/SemaChecking.cpp:4143-4150 @@ -4049,3 +4142,10 @@ if (StrE) { - CheckFormatString(S, StrE, E, Args, HasVAListArg, format_idx, + if (Offset.isNegative() || Offset > StrE->getLength()) { + // TODO: It would be better to have an explicit warning for out of + // bounds literals. + return SLCT_NotALiteral; + } + FormatStringLiteral FStr = + FormatStringLiteral(StrE, Offset.sextOrTrunc(64).getSExtValue()); + CheckFormatString(S, &FStr, E, Args, HasVAListArg, format_idx, firstDataArg, Type, InFunctionCall, CallType, ---------------- The = case is part of a different warning. It's checked in CheckFormatString. https://reviews.llvm.org/D23820 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits