Commit 8690321
committed
[analyzer][NFCI] Remove pointless program point tagging
Previously some checkers attached explicitly created program point tags
to some of the exploded graph nodes that they created. In most of the
checkers this ad-hoc tagging only affected the debug dump of the
exploded graph (and they weren't too relevant for debugging) so this
commit removes them.
There were two checkers where the tagging _did_ have a functional role:
- In `RetainCountChecker` the presence of tags were checked by
`RefCountReportVisitor`.
- In `DynamicTypePropagation` the checker sometimes wanted to create two
identical nodes and had to apply an explicit tag on the second one to
avoid "caching out".
In these two situations I preserved the tags but switched to using
`SimpleProgramPointTag` instead of `CheckerProgramPointTag` because
`CheckerProgramPointTag` didn't provide enough benefits to justify its
existence.
Note that this commit depends on the earlier commit "[analyzer] Fix
tagging of PostAllocatorCall" ec96c0c
and would introduce crashes when cherry-picked onto a branch that
doesn't contain that commit.
For more details about the background see the discourse thread
https://discourse.llvm.org/t/role-of-programpointtag-in-the-static-analyzer/
As a tangentially related changes, this commit also adds some comments
to document the surprising behavior of `CheckerContext::addTransition`
and an assertion in the constructor of `PathSensitiveBugReport` to get a
more readable crash dump in the case when the report is constructed with
`nullptr` as the `ErrorNode`. (This can happen due to "caching out".)1 parent d7c7c46 commit 8690321
File tree
14 files changed
+56
-89
lines changed- clang
- include/clang/StaticAnalyzer/Core
- PathSensitive
- lib/StaticAnalyzer
- Checkers
- MPI-Checker
- RetainCountChecker
- Core
14 files changed
+56
-89
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | 611 | | |
626 | 612 | | |
627 | 613 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
174 | 177 | | |
175 | 178 | | |
176 | 179 | | |
| |||
183 | 186 | | |
184 | 187 | | |
185 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
186 | 192 | | |
187 | 193 | | |
188 | 194 | | |
| |||
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
674 | | - | |
675 | 674 | | |
676 | 675 | | |
677 | 676 | | |
| |||
682 | 681 | | |
683 | 682 | | |
684 | 683 | | |
685 | | - | |
| 684 | + | |
686 | 685 | | |
687 | 686 | | |
688 | 687 | | |
| |||
701 | 700 | | |
702 | 701 | | |
703 | 702 | | |
704 | | - | |
| 703 | + | |
705 | 704 | | |
706 | 705 | | |
707 | 706 | | |
| |||
720 | 719 | | |
721 | 720 | | |
722 | 721 | | |
723 | | - | |
| 722 | + | |
724 | 723 | | |
725 | 724 | | |
726 | 725 | | |
| |||
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
677 | | - | |
678 | | - | |
679 | | - | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
680 | 687 | | |
681 | 688 | | |
682 | 689 | | |
| |||
885 | 892 | | |
886 | 893 | | |
887 | 894 | | |
888 | | - | |
889 | | - | |
| 895 | + | |
890 | 896 | | |
891 | 897 | | |
892 | 898 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1043 | 1043 | | |
1044 | 1044 | | |
1045 | 1045 | | |
1046 | | - | |
1047 | | - | |
| 1046 | + | |
1048 | 1047 | | |
1049 | 1048 | | |
1050 | 1049 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
750 | | - | |
751 | | - | |
752 | | - | |
| 750 | + | |
753 | 751 | | |
754 | 752 | | |
755 | 753 | | |
| |||
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
| |||
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
85 | | - | |
| 84 | + | |
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
| |||
105 | 104 | | |
106 | 105 | | |
107 | 106 | | |
108 | | - | |
109 | 107 | | |
110 | 108 | | |
111 | 109 | | |
| |||
114 | 112 | | |
115 | 113 | | |
116 | 114 | | |
117 | | - | |
| 115 | + | |
118 | 116 | | |
119 | 117 | | |
120 | 118 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
559 | | - | |
560 | | - | |
| 559 | + | |
561 | 560 | | |
562 | 561 | | |
563 | 562 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3098 | 3098 | | |
3099 | 3099 | | |
3100 | 3100 | | |
3101 | | - | |
3102 | | - | |
| 3101 | + | |
3103 | 3102 | | |
3104 | 3103 | | |
3105 | 3104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
714 | 715 | | |
715 | 716 | | |
716 | 717 | | |
717 | | - | |
718 | | - | |
| 718 | + | |
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
| |||
750 | 750 | | |
751 | 751 | | |
752 | 752 | | |
753 | | - | |
754 | | - | |
| 753 | + | |
755 | 754 | | |
756 | 755 | | |
757 | 756 | | |
| |||
1299 | 1298 | | |
1300 | 1299 | | |
1301 | 1300 | | |
1302 | | - | |
1303 | | - | |
| 1301 | + | |
1304 | 1302 | | |
1305 | 1303 | | |
1306 | 1304 | | |
| |||
1342 | 1340 | | |
1343 | 1341 | | |
1344 | 1342 | | |
1345 | | - | |
1346 | | - | |
| 1343 | + | |
1347 | 1344 | | |
1348 | 1345 | | |
1349 | 1346 | | |
| |||
0 commit comments