[PATCH] D130123: [Phabricator] extend ptr32 support to be applied on typedef

Ariel Burton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 19 13:42:19 PDT 2022


Ariel-Burton created this revision.
Ariel-Burton added reviewers: akhuang, rnk, rsmith.
Herald added a project: All.
Ariel-Burton requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Earlier, if the QualType was sugared, then we would error out
as it was not a pointer type, for example,

typedef int *int_star;

int_star __ptr32  p;

Now, if ptr32 is given we apply it if the raw Canonical Type
(i.e., the desugared type) is a PointerType, instead of only
checking whether the sugared type is a pointer type.

As before, we still disallow ptr32 usage if the pointer is used
as a pointer to a member.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130123

Files:
  clang/lib/Sema/SemaType.cpp
  clang/test/CodeGen/address-space-ptr32.c
  clang/test/Sema/MicrosoftExtensions.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130123.445932.patch
Type: text/x-patch
Size: 4906 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220719/5c43f4e0/attachment.bin>


More information about the cfe-commits mailing list