[PATCH] D120770: [C2x] Implement literal suffixes for _BitInt

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 2 12:24:18 PST 2022


aaron.ballman marked 5 inline comments as done.
aaron.ballman added inline comments.


================
Comment at: clang/lib/AST/StmtPrinter.cpp:1157
+  if (const auto *BT = Node->getType()->getAs<BitIntType>()) {
+    OS << (BT->isUnsigned() ? "uwb" : "wb");
+    return;
----------------
erichkeane wrote:
> aaron.ballman wrote:
> > erichkeane wrote:
> > > Nit: Instead of BT->isUnsigned(), we already have isSigned above.
> > Good call!
> Isn't this reversed now?
It was, and the AST/bitint-suffix.c test caught it, but I missed it locally. I've corrected here (and verified we have test coverage for the code). Oops!


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

https://reviews.llvm.org/D120770



More information about the cfe-commits mailing list