ziqingluo-90 added inline comments.
================ Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:1034-1035 + assert(!InitFixIts.empty() && + "Expected at least one fix-it for an initializer of an unsafe " + "variable declaration."); // The loc right before the initializer: ---------------- NoQ wrote: > The old check was saying "`populateInitializerFixItWithSpan()` returns `{}` > on error". So the new check is additionally saying > "`populateInitializerFixItWithSpan()` isn't allowed to have errors anymore", > which is arguably the more important message 🤔 yeah, I think we are being consistent on using `std::nullopt` to represent "something wrong, no fix" and using `{ }` to represent a no-op fix. So the old code is incorrect. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143680/new/ https://reviews.llvm.org/D143680 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits