diff options
author | Qizhi Hu <836744285@qq.com> | 2024-04-30 16:15:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-30 16:15:06 +0800 |
commit | a413c563bdcaac08f7c325c7d69e19f924435e59 (patch) | |
tree | 4adc134b5de3f431d237610f40c62d8e2a928f96 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | eaee8aa0afe111f9291d54ecef97a3640a0f6ce0 (diff) | |
download | llvm-a413c563bdcaac08f7c325c7d69e19f924435e59.zip llvm-a413c563bdcaac08f7c325c7d69e19f924435e59.tar.gz llvm-a413c563bdcaac08f7c325c7d69e19f924435e59.tar.bz2 |
[Clang][Sema] Fix a bug on template partial specialization with issue on deduction of nontype template parameter (#90376)
Fix https://github.com/llvm/llvm-project/issues/68885
When build expression from a deduced argument whose kind is
`Declaration` and `NTTPType`(which declared as `decltype(auto)`) is
deduced as a reference type, `BuildExpressionFromDeclTemplateArgument`
just create a `DeclRef`. This is incorrect while we get type from the
expression since we can't get the original reference type from
`DeclRef`. Creating a `SubstNonTypeTemplateParmExpr` expression and make
the deduction correct. `Replacement` expression of
`SubstNonTypeTemplateParmExpr` just helps the deduction and may not be
same with the original expression.
Co-authored-by: huqizhi <836744285@qq.com>
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions