[PATCH] D132413: [NFC] Make format() more amenable to format attributes

Akira Hatanaka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 24 21:40:52 PDT 2022


ahatanak accepted this revision.
ahatanak added a comment.
This revision is now accepted and ready to land.

LGTM with minor comments.



================
Comment at: llvm/lib/Support/Format.cpp:59
+
+constexpr uint64_t SpecifierBit(char C) { return 1 << (C - 0x40); }
+
----------------
Function names should start with a lower case letter.

https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly

Please fix this and other functions in this patch that start with an upper case letter.


================
Comment at: llvm/lib/Support/Format.cpp:184
+    // %% case: skip and try again
+    Fmt++;
+    RefillSpecifierQueue();
----------------
The coding standard recommends using preincrement. A few other places are using postincrement too.

https://llvm.org/docs/CodingStandards.html#prefer-preincrement


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132413



More information about the llvm-commits mailing list