This is an archive of the discontinued LLVM Phabricator instance.

[clang][Sema] Fix a crash when instantiating a non-type template argument in a dependent scope.
ClosedPublic

Authored by 0x59616e on May 22 2023, 12:33 AM.

Details

Summary

The type alias template is not diagnosed when instantiate an expected non-type template under dependent scope, causing ICE.

Besides that, the diagnostic message has been updated to account for the fact that the function template is not the only non-type template.

Fixes #62533

Diff Detail

Event Timeline

0x59616e created this revision.May 22 2023, 12:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 22 2023, 12:33 AM
0x59616e requested review of this revision.May 22 2023, 12:33 AM
0x59616e retitled this revision from [clang][Sema] Fix a bug when instantiate non-type template under dependent scope. to [clang][Sema] Fix a crash when instantiate non-type template under dependent scope..May 22 2023, 12:41 AM
0x59616e edited the summary of this revision. (Show Details)May 22 2023, 1:38 AM
0x59616e edited the summary of this revision. (Show Details)
erichkeane accepted this revision.May 22 2023, 6:23 AM
This revision is now accepted and ready to land.May 22 2023, 6:23 AM

Should I put a description of this fix in ReleaseNote ?

Yes, please do add a release note!

0x59616e planned changes to this revision.May 23 2023, 5:49 PM
0x59616e updated this revision to Diff 524953.

Add release note.

This revision is now accepted and ready to land.May 23 2023, 5:50 PM
erichkeane added inline comments.May 24 2023, 5:52 AM
clang/docs/ReleaseNotes.rst
440–441
0x59616e updated this revision to Diff 525157.May 24 2023, 6:40 AM
0x59616e retitled this revision from [clang][Sema] Fix a crash when instantiate non-type template under dependent scope. to [clang][Sema] Fix a crash when instantiating a non-type template argument in a dependent scope..

Address feedbacks.

0x59616e marked an inline comment as done.May 24 2023, 6:40 AM
erichkeane accepted this revision.May 24 2023, 6:41 AM

LGTM! Feel free to commit

Thanks for reviewing ! ;)

This revision was landed with ongoing or failed builds.May 24 2023, 6:47 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 24 2023, 6:47 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript