[PATCH] D125429: Comment parsing: Allow inline commands to have 0 or more than 1 argument

Aaron Puchert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 13 07:35:36 PDT 2022


aaronpuchert added a comment.

So we have overloads

  inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, int I);
  inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, int64_t I);
  inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, unsigned I);
  inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, uint64_t I);

And it appears that `unsigned long` does not have a clear favorite here. Is that because `long` is 32-bit like on Windows, but at the same time it's not the same as `unsigned` which is also 32-bit? Could we resolve this somehow so that we don't have the next person writing inconspicuous code to run into this?

Perhaps we should overload on `(u)int32_t` instead `int`/`unsigned`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125429



More information about the cfe-commits mailing list