Skip to content
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

feat(schema): add ref/writes #5581

Merged
merged 3 commits into from
Apr 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 34 additions & 0 deletions kythe/docs/schema/schema.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1463,6 +1463,40 @@ Ordinals are used::
#endif
--------------------------------------------------------------------------------

[[refwrites]]
ref/writes
~~~~~~~~~~

Brief description::
A *ref/writes* B if A refers to B in an expression that is likely to update
the value of B.
Commonly arises from::
assignment, accessor functions
Points from::
anchors
Points toward::
semantic nodes
Ordinals are used::
never
Notes::
This is an experimental definition and is expected to undergo refinement.

[kythe,C++,"Various assignment expressions are writes"]
--------------------------------------------------------------------------------
void f() {
//- @x defines/binding VarX
int x = 0;
//- @x ref/writes VarX
x = 1;
// Some special forms may be supported.
//- @x ref/writes VarX
*(&x) = 1;
// Not all forms are supported.
zrlk marked this conversation as resolved.
Show resolved Hide resolved
//- @x ref VarX
*(&x + 1) = 1;
}
--------------------------------------------------------------------------------

[[satisfies]]
satisfies
~~~~~~~~~
Expand Down