Commit 112a612
authored
Fixes non-functional changes found static analyzer (#171197)
As per @arsenm 's instructions, I've separated the non-functional
changes from #169958.
Afterwards I'll tackle the functional ones one by one. I hope I did
everything right this time.
Full descriptions in the article:
https://pvs-studio.com/en/blog/posts/cpp/1318/
3. Array overrun is possible.
The PVS-Studio warning: V557 Array overrun is possible. The value of
'regIdx' index could reach 31. VEAsmParser.cpp 696
10. Excessive check.
The PVS-Studio warning: V547 Expression 'IsLeaf' is always false.
PPCInstrInfo.cpp 419
11. Doubling the same check.
The PVS-Studio warning: V581 The conditional expressions of the 'if'
statements situated alongside each other are identical. Check lines:
5820, 5823. PPCInstrInfo.cpp 5823
15. Excessive check.
The PVS-Studio warning: V547 Expression 'i != e' is always true.
MachineFunction.cpp 1444
17. Excessive assignment.
The PVS-Studio warning: V1048 The 'FirstOp' variable was assigned the
same value. MachineInstr.cpp 1995
18. Excessive check.
The PVS-Studio warning: V547 Expression 'AllSame' is always true.
SimplifyCFG.cpp 1914
19. Excessive check.
The PVS-Studio warning: V547 Expression 'AbbrevDecl' is always true.
LVDWARFReader.cpp 3981 parent 6853597 commit 112a612
File tree
6 files changed
+14
-26
lines changed- llvm/lib
- CodeGen
- DebugInfo/LogicalView/Readers
- Target
- PowerPC
- VE/AsmParser
- Transforms/Utils
6 files changed
+14
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1439 | 1439 | | |
1440 | 1440 | | |
1441 | 1441 | | |
1442 | | - | |
1443 | | - | |
| 1442 | + | |
1444 | 1443 | | |
1445 | 1444 | | |
1446 | 1445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2011 | 2011 | | |
2012 | 2012 | | |
2013 | 2013 | | |
2014 | | - | |
2015 | 2014 | | |
2016 | 2015 | | |
2017 | 2016 | | |
2018 | 2017 | | |
2019 | 2018 | | |
2020 | 2019 | | |
2021 | 2020 | | |
2022 | | - | |
2023 | 2021 | | |
2024 | 2022 | | |
2025 | 2023 | | |
2026 | 2024 | | |
2027 | 2025 | | |
2028 | 2026 | | |
2029 | 2027 | | |
2030 | | - | |
2031 | 2028 | | |
2032 | 2029 | | |
2033 | 2030 | | |
2034 | 2031 | | |
2035 | 2032 | | |
2036 | 2033 | | |
2037 | 2034 | | |
2038 | | - | |
2039 | 2035 | | |
2040 | 2036 | | |
2041 | 2037 | | |
2042 | 2038 | | |
2043 | 2039 | | |
2044 | 2040 | | |
2045 | 2041 | | |
2046 | | - | |
2047 | 2042 | | |
2048 | 2043 | | |
2049 | 2044 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
402 | 401 | | |
403 | 402 | | |
404 | 403 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
419 | | - | |
| 419 | + | |
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
| |||
5810 | 5810 | | |
5811 | 5811 | | |
5812 | 5812 | | |
5813 | | - | |
5814 | | - | |
5815 | | - | |
5816 | 5813 | | |
5817 | 5814 | | |
5818 | 5815 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
694 | 694 | | |
695 | 695 | | |
696 | 696 | | |
697 | | - | |
| 697 | + | |
698 | 698 | | |
699 | 699 | | |
700 | 700 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1913 | 1913 | | |
1914 | 1914 | | |
1915 | 1915 | | |
1916 | | - | |
1917 | | - | |
1918 | | - | |
1919 | | - | |
1920 | | - | |
1921 | | - | |
1922 | | - | |
1923 | | - | |
1924 | | - | |
1925 | | - | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
1926 | 1923 | | |
| 1924 | + | |
1927 | 1925 | | |
1928 | 1926 | | |
1929 | 1927 | | |
| |||
0 commit comments