[PATCH] D154283: [clang-tidy] Fix width/precision argument order in modernize-use-std-print

Piotr Zegar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 2 06:38:15 PDT 2023


PiotrZSL added a comment.

Just few nits, from functionally point of view looks fine.



================
Comment at: clang-tools-extra/clang-tidy/utils/FormatStringConverter.cpp:356-357
+  if (ArgCount)
+    ArgRotates.push_back(
+        std::make_tuple(FS.getArgIndex() + ArgsOffset, ArgCount));
+}
----------------



================
Comment at: clang-tools-extra/clang-tidy/utils/FormatStringConverter.h:73
+  // puts the width and preicision first.
+  std::vector<std::tuple<unsigned, unsigned>> ArgRotates;
+
----------------
NOTE: You can use std::pair here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154283/new/

https://reviews.llvm.org/D154283



More information about the cfe-commits mailing list