[PATCH] D133468: [clang] Implement divergence for TypedefType and UsingType

Matheus Izvekov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 7 19:43:38 PDT 2022


mizvekov created this revision.
Herald added a subscriber: martong.
Herald added a reviewer: shafik.
Herald added a project: All.
mizvekov requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

With this patch, TypedefTypes and UsingTypes can have an
underlying type which diverges from their corresponding
declarations.

For the TypedefType case, this can be seen when getting
the common sugared type between two redeclarations with
different sugar.

For both cases, this will become important as resugaring
is implemented, as this will allow us to resugar these
when they were dependent before instantiation.

Depends on D132816 <https://reviews.llvm.org/D132816>

Signed-off-by: Matheus Izvekov <mizvekov at gmail.com>

Depends on D132816 <https://reviews.llvm.org/D132816>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133468

Files:
  clang/include/clang/AST/ASTContext.h
  clang/include/clang/AST/JSONNodeDumper.h
  clang/include/clang/AST/Type.h
  clang/include/clang/AST/TypeProperties.td
  clang/lib/AST/ASTContext.cpp
  clang/lib/AST/ASTImporter.cpp
  clang/lib/AST/ASTStructuralEquivalence.cpp
  clang/lib/AST/JSONNodeDumper.cpp
  clang/lib/AST/TextNodeDumper.cpp
  clang/lib/AST/Type.cpp
  clang/test/SemaCXX/sugar-common-types.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133468.458629.patch
Type: text/x-patch
Size: 15802 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220908/89206f40/attachment-0001.bin>


More information about the cfe-commits mailing list