[PATCH] D115253: [C2x] Support the *_WIDTH macros in limits.h and stdint.h

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 13 08:47:01 PST 2022


aaron.ballman closed this revision.
aaron.ballman added a comment.

In D115253#3240789 <https://reviews.llvm.org/D115253#3240789>, @jyknight wrote:

> Accepting assuming the last comment will be addressed before pushing. Thanks!

Thank you for the excellent reviews, I really appreciate it!

I made the requested changes and commit in bf7d9970ba0ac5ecfa1a469086f5789de5c94e3f <https://reviews.llvm.org/rGbf7d9970ba0ac5ecfa1a469086f5789de5c94e3f>.



================
Comment at: clang/lib/Frontend/InitPreprocessor.cpp:257
+  if (IsSigned)
+    DefineTypeSizeAndWidth("__INT" + Twine(TypeWidth), Ty, TI, Builder);
+  else
----------------
jyknight wrote:
> DefineTypeSizeAndWidth isn't necessary from DefineExactWidthIntTypeSize, since `__INT#_WIDTH__ == #` always, so there's no point in emitting `#define __INT8_WIDTH__ 8`, etc.
LOL, good catch.


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

https://reviews.llvm.org/D115253



More information about the cfe-commits mailing list