Skip to content
Commit 79f9cfbc authored by Yaxun (Sam) Liu's avatar Yaxun (Sam) Liu
Browse files

Do not merge LocalInstantiationScope for template specialization

A lambda in a function template may be recursively instantiated. The recursive
lambda will cause a lambda function instantiated multiple times, one inside another.
The inner LocalInstantiationScope should not be marked as MergeWithParentScope
since it already has references to locals properly substituted, otherwise it causes
assertion due to the check for duplicate locals in merged LocalInstantiationScope.

Reviewed by: Richard Smith

Differential Revision: https://reviews.llvm.org/D98068
parent 1b87573a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment