Commit 582f046
[CGExprConstant] stop calling into ConstExprEmitter for Reference type destinations (#70366)
Fixes a bug introduced by
commit b54294e ("[clang][ConstantEmitter] have
tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first")
In the added test case, the QualType is a LValueReferenceType.
LValueReferenceType 0x558412998d90 'const char (&)[41]'
`-ParenType 0x558412998d30 'const char[41]' sugar
`-ConstantArrayType 0x558412998cf0 'const char[41]' 41
`-QualType 0x55841294c271 'const char' const
`-BuiltinType 0x55841294c270 'char'
Fixes: #69979
(cherry picked from commit d9b15b0)1 parent 309d551 commit 582f046
File tree
2 files changed
+10
-3
lines changed- clang
- lib/CodeGen
- test/CodeGenCXX
2 files changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1736 | 1736 | | |
1737 | 1737 | | |
1738 | 1738 | | |
1739 | | - | |
1740 | | - | |
1741 | | - | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
1742 | 1743 | | |
1743 | 1744 | | |
1744 | 1745 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| 427 | + | |
| 428 | + | |
427 | 429 | | |
428 | 430 | | |
429 | 431 | | |
| |||
632 | 634 | | |
633 | 635 | | |
634 | 636 | | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
635 | 641 | | |
636 | 642 | | |
637 | 643 | | |
0 commit comments