-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[FlowSensitive] Allow to dump nested RecordStorageLocation #112457
[FlowSensitive] Allow to dump nested RecordStorageLocation #112457
Conversation
Created using spr 1.3.4
@llvm/pr-subscribers-clang-analysis Author: Florian Mayer (fmayer) ChangesWe have an internal analysis that uses them, and the HTML dump would Full diff: https://github.com/llvm/llvm-project/pull/112457.diff 1 Files Affected:
diff --git a/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp b/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp
index a36cb41a63dfb1..557df218837941 100644
--- a/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp
+++ b/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp
@@ -133,8 +133,7 @@ class ModelDumper {
for (const auto &Child : RLoc->children())
JOS.attributeObject("f:" + Child.first->getNameAsString(), [&] {
if (Child.second)
- if (Value *Val = Env.getValue(*Child.second))
- dump(*Val);
+ dump(*Child.second);
});
for (const auto &SyntheticField : RLoc->synthetic_fields())
|
@llvm/pr-subscribers-clang Author: Florian Mayer (fmayer) ChangesWe have an internal analysis that uses them, and the HTML dump would Full diff: https://github.com/llvm/llvm-project/pull/112457.diff 1 Files Affected:
diff --git a/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp b/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp
index a36cb41a63dfb1..557df218837941 100644
--- a/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp
+++ b/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp
@@ -133,8 +133,7 @@ class ModelDumper {
for (const auto &Child : RLoc->children())
JOS.attributeObject("f:" + Child.first->getNameAsString(), [&] {
if (Child.second)
- if (Value *Val = Env.getValue(*Child.second))
- dump(*Val);
+ dump(*Child.second);
});
for (const auto &SyntheticField : RLoc->synthetic_fields())
|
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.
I would suggest a brief comment explaining the choice not to filter.
I'm not sure I understand. There wasn't a choice to filter before, there was just the (incorrect) assumption that we don't have nested |
I think this is the right change. What I don't understand, though, is why you were getting an assert failure before. (Which line is the assertion on that failed?) I would have thought if you don't dump the nested record, you just get less information. Apparently not so?
@ymand I think maybe what you're missing is that the code is calling a different overload of @fmayer Just as an explanation of why this check is there: I think this isn't because the code assumed that nested |
Because the first line of
|
Ah, of course, that makes sense. Thanks! |
We have an internal analysis that uses them, and the HTML dump would fail on the assertion.
We have an internal analysis that uses them, and the HTML dump would
fail on the assertion.