rsmith accepted this revision. This revision is now accepted and ready to land.
================ Comment at: lib/Analysis/FormatString.cpp:276 @@ +275,3 @@ + // UTF-8 sequence. If that's the case, adjust the length accordingly. + if (llvm::sys::locale::isPrint(FirstByte)) + return false; ---------------- How about using `getNumBytesForUTF8(FirstByte) != 1` here? ================ Comment at: lib/Analysis/FormatString.cpp:278 @@ +277,3 @@ + return false; + if (!isLegalUTF8String(&SB, SE)) + return false; ---------------- Perhaps only check `&SB, &SB + Len` -- it doesn't seem problematic if there's some non-UTF8 data after the specifier. http://reviews.llvm.org/D18296 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits