Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cxx_indexer): support ++ and -- for influence and r/w refs (#4908)
* feat(cxx_indexer): support ++ and -- for influence and r/w refs
- Loading branch information
Showing
6 changed files
with
90 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Unary {post,pre}{inc,dec}rements are included in the influence graph. | ||
void f() { | ||
int x, y, z; | ||
//- @x ref VarX | ||
//- @x ref/writes VarX | ||
x++; | ||
//- @x ref VarX | ||
//- @x ref/writes VarX | ||
++x; | ||
//- @x ref VarX | ||
//- @x ref/writes VarX | ||
x--; | ||
//- @x ref VarX | ||
//- @x ref/writes VarX | ||
--x; | ||
//- VarX influences VarX | ||
//- !{ @x ref/writes VarX } | ||
//- !{ @z ref/writes VarZ } | ||
//- !{ @y ref VarY } | ||
//- @z ref VarZ | ||
//- @x ref VarX | ||
//- @y ref/writes VarY | ||
y = x + z; | ||
} |