Skip to content

Revert "[clang][dataflow] Expose simple access to child StorageLocation presence." #145710

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

Merged
merged 1 commit into from
Jun 25, 2025

Conversation

bazuzi
Copy link
Contributor

@bazuzi bazuzi commented Jun 25, 2025

Reverts #145520

Exposed function is no longer needed and side-stepped the intended contract that the present children are the same set returned by getModeledFields() and presence shouldn't need to be queried for arbitrary fields.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html clang:analysis labels Jun 25, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 25, 2025

@llvm/pr-subscribers-clang

Author: Samira Bakon (bazuzi)

Changes

Reverts llvm/llvm-project#145520

Exposed function is no longer needed and side-stepped the intended contract that the present children are the same set returned by getModeledFields() and presence shouldn't need to be queried for arbitrary fields.


Full diff: https://github.com/llvm/llvm-project/pull/145710.diff

1 Files Affected:

  • (modified) clang/include/clang/Analysis/FlowSensitive/StorageLocation.h (-2)
diff --git a/clang/include/clang/Analysis/FlowSensitive/StorageLocation.h b/clang/include/clang/Analysis/FlowSensitive/StorageLocation.h
index 8b263b16d5b1e..8fcc6a44027a0 100644
--- a/clang/include/clang/Analysis/FlowSensitive/StorageLocation.h
+++ b/clang/include/clang/Analysis/FlowSensitive/StorageLocation.h
@@ -168,8 +168,6 @@ class RecordStorageLocation final : public StorageLocation {
     return {Children.begin(), Children.end()};
   }
 
-  bool hasChild(const ValueDecl &D) const { return Children.contains(&D); }
-
 private:
   FieldToLoc Children;
   SyntheticFieldMap SyntheticFields;

@llvmbot
Copy link
Member

llvmbot commented Jun 25, 2025

@llvm/pr-subscribers-clang-analysis

Author: Samira Bakon (bazuzi)

Changes

Reverts llvm/llvm-project#145520

Exposed function is no longer needed and side-stepped the intended contract that the present children are the same set returned by getModeledFields() and presence shouldn't need to be queried for arbitrary fields.


Full diff: https://github.com/llvm/llvm-project/pull/145710.diff

1 Files Affected:

  • (modified) clang/include/clang/Analysis/FlowSensitive/StorageLocation.h (-2)
diff --git a/clang/include/clang/Analysis/FlowSensitive/StorageLocation.h b/clang/include/clang/Analysis/FlowSensitive/StorageLocation.h
index 8b263b16d5b1e..8fcc6a44027a0 100644
--- a/clang/include/clang/Analysis/FlowSensitive/StorageLocation.h
+++ b/clang/include/clang/Analysis/FlowSensitive/StorageLocation.h
@@ -168,8 +168,6 @@ class RecordStorageLocation final : public StorageLocation {
     return {Children.begin(), Children.end()};
   }
 
-  bool hasChild(const ValueDecl &D) const { return Children.contains(&D); }
-
 private:
   FieldToLoc Children;
   SyntheticFieldMap SyntheticFields;

@bazuzi
Copy link
Contributor Author

bazuzi commented Jun 25, 2025

This reverts a simple change added <24 hours ago and reverting has been discussed directly with original change reviewers. Merging without additional review.

@bazuzi bazuzi merged commit e64f5dd into main Jun 25, 2025
9 of 11 checks passed
@bazuzi bazuzi deleted the revert-145520-getChild branch June 25, 2025 14:24
anthonyhatran pushed a commit to anthonyhatran/llvm-project that referenced this pull request Jun 26, 2025
…on presence." (llvm#145710)

Reverts llvm#145520

Exposed function is no longer needed and side-stepped the intended
contract that the present children are the same set returned by
`getModeledFields()` and presence shouldn't need to be queried for
arbitrary fields.
rlavaee pushed a commit to rlavaee/llvm-project that referenced this pull request Jul 1, 2025
…on presence." (llvm#145710)

Reverts llvm#145520

Exposed function is no longer needed and side-stepped the intended
contract that the present children are the same set returned by
`getModeledFields()` and presence shouldn't need to be queried for
arbitrary fields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:analysis clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants