aaron.ballman added inline comments.
================ Comment at: clang/lib/Basic/Diagnostic.cpp:792 +static void pushEscapedString(StringRef Str, SmallVectorImpl<char> &OutStr) { + OutStr.reserve(OutStr.size() + Str.size()); + const unsigned char *Begin = ---------------- aaron.ballman wrote: > cor3ntin wrote: > > jfb wrote: > > > Can this addition overflow? > > Technically yes, if you are trying to output a single string over 4GB I > > guess. Do we care? > Personally, I'm not overly worried about that scenario (I suspect we will run > into overflow like that far earlier). But if @jfb has a situation in mind > where this might be a concern, checking for overflow and diagnosing it > wouldn't be the worst outcome either. Though I should note: testing that scenario without causing undue impacts on running the tests may be interesting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108469/new/ https://reviews.llvm.org/D108469 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits