This is an archive of the discontinued LLVM Phabricator instance.

[clang] fix transformation of template arguments for concept specializations
Changes PlannedPublic

Authored by mizvekov on Aug 5 2021, 12:37 PM.

Details

Reviewers
rsmith
Summary

See PR50864.

This fixes error caused by substitution failures on template arguments
for concept specializations. With this patch, in such cases, the concept
specialization will evaluate to false instead.

As a bonus, we:

  • Remove some memory leak as an std::string was being stored in the AST.
  • Remove some duplicate implementation of serialization (as string) of substitution diagnostics for concepts.
  • Fix some cases where we would try to take a SFINAE diagnostic without checking if there was one first.

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

Diff Detail

Event Timeline

mizvekov created this revision.Aug 5 2021, 12:37 PM
mizvekov published this revision for review.Aug 5 2021, 1:21 PM
mizvekov added a reviewer: rsmith.
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2021, 1:21 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
mizvekov updated this revision to Diff 364742.Aug 6 2021, 3:23 AM
  • Better naming
  • Stop casting SmallString to StringRef, use .str() method instead.
mizvekov planned changes to this revision.Aug 11 2021, 2:41 PM