diff options
author | Oleksandr T. <oleksandr.tarasiuk@outlook.com> | 2024-12-18 12:36:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-18 12:36:23 +0200 |
commit | 9daf10ff8f29ba3a88a105aaa9d2379c21b77d35 (patch) | |
tree | cc894ee2f89e65e116c178a254cfe182070e506a /llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp | |
parent | b3eede5e1fa7ab742b86e9be22db7bccd2505b8a (diff) | |
download | llvm-9daf10ff8f29ba3a88a105aaa9d2379c21b77d35.zip llvm-9daf10ff8f29ba3a88a105aaa9d2379c21b77d35.tar.gz llvm-9daf10ff8f29ba3a88a105aaa9d2379c21b77d35.tar.bz2 |
Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (#115487)
This fixes a crash when instantiating default arguments for templated
friend function declarations which lack a definition.
There are implementation limits which prevents us from finding the
pattern for such functions, and this causes difficulties
setting up the instantiation scope for the function parameters.
This patch skips instantiating the default argument in these cases,
which causes a minor regression in error recovery, but otherwise avoids
the crash.
The previous attempt #113777 accidentally skipped all default argument
constructions, causing some regressions. This patch resolves that by
moving the guard to InstantiateDefaultArgument() where the handling of
templates takes place.
Fixes https://github.com/llvm/llvm-project/issues/113324
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp')
0 files changed, 0 insertions, 0 deletions