diff options
author | Younan Zhang <zyn7109@gmail.com> | 2025-05-16 16:21:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-16 16:21:24 +0800 |
commit | 858649ad0e2bd4c24d4e577094707a53acfe6ade (patch) | |
tree | a011c931c6da3a6d84a2cd65602ede250cc46cbb /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | fd85ffb4c43be80c179145a382d78a7c9ca3c1b7 (diff) | |
download | llvm-858649ad0e2bd4c24d4e577094707a53acfe6ade.zip llvm-858649ad0e2bd4c24d4e577094707a53acfe6ade.tar.gz llvm-858649ad0e2bd4c24d4e577094707a53acfe6ade.tar.bz2 |
[Clang] Profile singly-resolved UnresolvedLookupExpr with the declaration (#140029)
For a dependent variable template specialization, we don't build a
dependent Decl node or a DeclRefExpr to represent it. Instead, we
preserve the UnresolvedLookupExpr until instantiation.
However, this approach isn't ideal for constraint normalization. We
consider the qualifier during profiling, but since that's based on the
written code, it can introduce confusing differences, even when the
expressions resolve to the same declaration.
This change ensures that, if possible, we profile the resolved
declaration instead of its qualifier. For expressions that resolve to
more than one declarations, we still profile its qualifier, as otherwise
it would make us depend on the order of lookup results.
Fixes https://github.com/llvm/llvm-project/issues/139476
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions