Commit 8c2b0d4
authored
[Clang] Fix dependency of SourceLocExpr. (llvm#78436)
SourceLocExpr that may produce a function name are marked dependent so that the non-instantiated
name of a function does not get evaluated.
In GH78128, the name('s size) is used as
template argument to a `DeclRef` that is not otherwise dependent, and therefore cached and not transformed when the function is
instantiated, leading to 2 different values existing at the same time for the same function.
Fixes llvm#781281 parent 9917d39 commit 8c2b0d4
File tree
5 files changed
+47
-2
lines changed- clang
- docs
- include/clang/AST
- lib
- AST
- Sema
- test/SemaCXX
5 files changed
+47
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
972 | 972 | | |
973 | 973 | | |
974 | 974 | | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
975 | 979 | | |
976 | 980 | | |
977 | 981 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4756 | 4756 | | |
4757 | 4757 | | |
4758 | 4758 | | |
| 4759 | + | |
| 4760 | + | |
| 4761 | + | |
| 4762 | + | |
| 4763 | + | |
| 4764 | + | |
| 4765 | + | |
| 4766 | + | |
| 4767 | + | |
| 4768 | + | |
| 4769 | + | |
4759 | 4770 | | |
4760 | 4771 | | |
4761 | 4772 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2219 | 2219 | | |
2220 | 2220 | | |
2221 | 2221 | | |
2222 | | - | |
| 2222 | + | |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
2223 | 2226 | | |
2224 | 2227 | | |
2225 | 2228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12148 | 12148 | | |
12149 | 12149 | | |
12150 | 12150 | | |
12151 | | - | |
| 12151 | + | |
12152 | 12152 | | |
12153 | 12153 | | |
12154 | 12154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
805 | 805 | | |
806 | 806 | | |
807 | 807 | | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
0 commit comments