Skip to content

Conversation

@patrykstefanski
Copy link

Before this change, we could only map ValueDecl to Expr to model dependent values. This change adds support for mapping ValueDecl with optional dereference to Expr. For example, this allows us to model dependent values with the following mapping:

  count -> 42
  *out_count -> 100

Supporting dereference is necessary in order to check assignments to inout pointer and count in the future.

(cherry picked from commit a1cc31b)

Before this change, we could only map ValueDecl to Expr to model
dependent values. This change adds support for mapping ValueDecl with
optional dereference to Expr. For example, this allows us to model
dependent values with the following mapping:
  ```
    count -> 42
    *out_count -> 100
  ```
Supporting dereference is necessary in order to check assignments to
inout pointer and count in the future.

(cherry picked from commit a1cc31b)
@patrykstefanski
Copy link
Author

@swift-ci test llvm

@patrykstefanski patrykstefanski added the clang:bounds-safety Issue relating to the experimental -fbounds-safety feature in Clang label Oct 1, 2025
@patrykstefanski patrykstefanski self-assigned this Oct 1, 2025
@patrykstefanski patrykstefanski merged commit b8a171c into swiftlang:stable/21.x Oct 1, 2025
2 checks passed
@patrykstefanski patrykstefanski deleted the eng/pstefanski/dependent-values-with-deref-21.x branch October 1, 2025 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:bounds-safety Issue relating to the experimental -fbounds-safety feature in Clang

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant