[all-commits] [llvm/llvm-project] fc1102: [Support] Validate number of arguments passed to f...

Rahul Joshi via All-commits all-commits at lists.llvm.org
Thu Aug 29 08:00:46 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fc110202dffa06950716e0cc4535b07aaa2c439c
      https://github.com/llvm/llvm-project/commit/fc110202dffa06950716e0cc4535b07aaa2c439c
  Author: Rahul Joshi <rjoshi at nvidia.com>
  Date:   2024-08-29 (Thu, 29 Aug 2024)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
    M llvm/benchmarks/CMakeLists.txt
    A llvm/benchmarks/FormatVariadicBM.cpp
    M llvm/include/llvm/Support/FormatVariadic.h
    M llvm/lib/Support/FormatVariadic.cpp
    M llvm/unittests/Support/FormatVariadicTest.cpp
    M mlir/tools/mlir-tblgen/OpFormatGen.cpp

  Log Message:
  -----------
  [Support] Validate number of arguments passed to formatv() (#105745)

Change formatv() to validate that the number of arguments passed matches
number of replacement fields in the format string, and that the replacement
indices do not contain holes.

To support cases where this cannot be guaranteed, introduce a formatv()
overload that allows disabling validation with a bool flag as its first argument.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list