[PATCH] D133072: WIP: [clang] fix profiling of template arguments of template and declaration kind
Matheus Izvekov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 31 17:05:27 PDT 2022
mizvekov created this revision.
Herald added projects: clang, libc++, All.
Herald added subscribers: libcxx-commits, cfe-commits.
Herald added a reviewer: libc++.
mizvekov requested review of this revision.
Template arguments of template and declaration kind were being profiled
only by their canonical properties, which would cause incorrect
uniquing of constrained AutoTypes, leading to a crash in some cases.
This exposed some places in CheckTemplateArguments where non-canonical
arguments where being pushed into the resulting converted list.
We also throw in some asserts to catch early and explain the crashes.
Note that the fix for the 'declaration' kind is untestable at this point,
because there should be no cases right now in the AST where we try
to unique a non-canonical converted template argument.
This fixes GH55567.
Signed-off-by: Matheus Izvekov <mizvekov at gmail.com>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D133072
Files:
clang/lib/AST/ASTContext.cpp
clang/lib/AST/TemplateBase.cpp
clang/lib/Sema/SemaTemplate.cpp
clang/test/SemaTemplate/concepts.cpp
libcxx/DELETE.ME
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133072.457134.patch
Type: text/x-patch
Size: 4629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220901/e321bdda/attachment-0001.bin>
More information about the cfe-commits
mailing list