-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[analyzer] Print the PostInitializer target in exploded-graph-rewriter #116034
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) ChangesThis aids debugging PostInitializer program points by knowing what is the location being initialized. Full diff: https://github.com/llvm/llvm-project/pull/116034.diff 1 Files Affected:
diff --git a/clang/utils/analyzer/exploded-graph-rewriter.py b/clang/utils/analyzer/exploded-graph-rewriter.py
index 5eaa7738103f79..2eff20fd5899f3 100755
--- a/clang/utils/analyzer/exploded-graph-rewriter.py
+++ b/clang/utils/analyzer/exploded-graph-rewriter.py
@@ -88,6 +88,8 @@ def __init__(self, json_pp):
)
elif self.kind == "BlockEntrance":
self.block_id = json_pp["block_id"]
+ elif self.kind == "PostInitializer":
+ self.target = json_pp["field_decl"] if "field_decl" in json_pp else json_pp["type"]
# A single expression acting as a key in a deserialized Environment.
@@ -618,6 +620,13 @@ def visit_program_point(self, p):
'<font color="%s">%s</font></td>'
'<td align="left">[B%d]</td></tr>' % (color, p.kind, p.block_id)
)
+ elif p.kind == "PostInitializer":
+ self._dump(
+ '<td width="0"></td>'
+ '<td align="left" width="0">'
+ '<font color="%s">%s</font></td>'
+ '<td align="left">%s</td></tr>' % (color, p.kind, p.target)
+ )
else:
# TODO: Print more stuff for other kinds of points.
self._dump(
|
✅ With the latest revision this PR passed the Python code formatter. |
This aids debugging PostInitializer program points by knowing what is the location being initialized.
Ping @NagyDonat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for missing this review, I didn't noticed that this is distinct from the similar CallEnter
change.
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/134/builds/9118 Here is the relevant piece of the build log for the reference
|
This aids debugging PostInitializer program points by knowing what is the location being initialized.