[clang] [llvm] [mlir] [Support] Validate number of arguments passed to formatv() (PR #105745)

Rahul Joshi via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 28 19:33:55 PDT 2024


================
@@ -143,15 +140,76 @@ formatv_object_base::splitLiteralAndReplacement(StringRef Fmt) {
   return std::make_pair(ReplacementItem{Fmt}, StringRef());
 }
 
+#ifndef NDEBUG
+#define ENABLE_VALIDATION 1
+#else
+#define ENABLE_VALIDATION 1 // Convienently enable validation in release mode.
----------------
jurahul wrote:

Done.

https://github.com/llvm/llvm-project/pull/105745


More information about the cfe-commits mailing list