Commit 58c92b9
[clang-tidy] Fix false positives about references in
It's not legal to cast const pointer type to it's non-const reference
type implicitly, and will cause compile error.
And for explicit cast, it's legal but the pointer is mutable through
this reference.misc-const-correctness (#160971)1 parent 6ee20ce commit 58c92b9
File tree
4 files changed
+55
-12
lines changed- clang-tools-extra
- docs
- test/clang-tidy/checkers/misc
- clang
- lib/Analysis
- unittests/Analysis
4 files changed
+55
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
321 | 325 | | |
322 | 326 | | |
323 | 327 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
758 | | - | |
759 | | - | |
| 758 | + | |
| 759 | + | |
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
763 | | - | |
| 763 | + | |
764 | 764 | | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
769 | 769 | | |
770 | 770 | | |
771 | 771 | | |
772 | | - | |
773 | | - | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
774 | 775 | | |
775 | 776 | | |
776 | 777 | | |
| |||
779 | 780 | | |
780 | 781 | | |
781 | 782 | | |
782 | | - | |
783 | | - | |
784 | | - | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
785 | 786 | | |
786 | 787 | | |
787 | 788 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1749 | 1749 | | |
1750 | 1750 | | |
1751 | 1751 | | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
1752 | 1759 | | |
1753 | 1760 | | |
1754 | 1761 | | |
| |||
1786 | 1793 | | |
1787 | 1794 | | |
1788 | 1795 | | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
1789 | 1804 | | |
1790 | 1805 | | |
1791 | 1806 | | |
| |||
1884 | 1899 | | |
1885 | 1900 | | |
1886 | 1901 | | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
1887 | 1910 | | |
1888 | 1911 | | |
1889 | 1912 | | |
| |||
0 commit comments