Commit debef50
committed
[Clang] Profile singly-resolved UnresolvedLookupExpr with the declaration
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.1 parent cbf10c2 commit debef50
File tree
3 files changed
+20
-1
lines changed- clang
- docs
- lib/AST
- test/SemaTemplate
3 files changed
+20
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| 548 | + | |
548 | 549 | | |
549 | 550 | | |
550 | 551 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2189 | 2189 | | |
2190 | 2190 | | |
2191 | 2191 | | |
2192 | | - | |
| 2192 | + | |
| 2193 | + | |
| 2194 | + | |
| 2195 | + | |
2193 | 2196 | | |
2194 | 2197 | | |
2195 | 2198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
0 commit comments