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

James Y Knight via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 13 08:03:13 PST 2022


jyknight accepted this revision.
jyknight added a comment.

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



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


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

https://reviews.llvm.org/D115253



More information about the cfe-commits mailing list