[all-commits] [llvm/llvm-project] f53f2f: Extend ptr32 support to be applied on typedef

Ariel-Burton via All-commits all-commits at lists.llvm.org
Tue Aug 9 08:09:28 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f53f2f232f794a257c270f4c273b9c9000421c81
      https://github.com/llvm/llvm-project/commit/f53f2f232f794a257c270f4c273b9c9000421c81
  Author: Ariel Burton <Ariel.Burton at ibm.com>
  Date:   2022-08-09 (Tue, 09 Aug 2022)

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

  Log Message:
  -----------
  Extend ptr32 support to be applied on typedef

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.

Differential Revision: https://reviews.llvm.org/D130123




More information about the All-commits mailing list