[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 19 09:24:27 PST 2022
erichkeane added a comment.
No comments other than the ones others have made, though the make_signed/make_unsigned needs to work for _BitInt
================
Comment at: clang/lib/Sema/SemaType.cpp:9113
+ BaseType.isReferenceable() || BaseType->isVoidType()
+ ? BuildPointerType(BaseType.getNonReferenceType(), Loc, EntityName)
+ : BaseType;
----------------
Do we at any point want this builtin to be address-space aware?
================
Comment at: clang/lib/Sema/SemaType.cpp:9227
- DiagnoseUseOfDecl(ED, Loc);
+ QualType Underlying = Context.getIntTypeForBitwidth(
+ Context.getIntWidth(BaseType), IsMakeSigned);
----------------
Can you add a couple of tests to make sure this works with _BitInt? Note that this + the libc++ fixes get this done: https://github.com/llvm/llvm-project/issues/50427
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116203/new/
https://reviews.llvm.org/D116203
More information about the cfe-commits
mailing list