@@ -25,7 +25,7 @@ struct Bottom : Middle {
2525 void notSink (int x) override { }
2626};
2727
28- void VirtualDispatch (Bottom *bottomPtr, Bottom &bottomRef) {
28+ void VirtualDispatch (Bottom *bottomPtr, Bottom &bottomRef) { // $ ast-def=bottomPtr ast-def=bottomRef
2929 Top *topPtr = bottomPtr, &topRef = bottomRef;
3030
3131 sink (topPtr->isSource1 ()); // $ ir MISSING: ast
@@ -65,11 +65,11 @@ Top *allocateBottom() {
6565 return new Bottom ();
6666}
6767
68- void callSinkByPointer (Top *top) {
68+ void callSinkByPointer (Top *top) { // $ ast-def=top
6969 top->isSink (source ()); // leads to MISSING from ast
7070}
7171
72- void callSinkByReference (Top &top) {
72+ void callSinkByReference (Top &top) { // $ ast-def=top
7373 top.isSink (source ()); // leads to MISSING from ast
7474}
7575
@@ -81,11 +81,11 @@ void globalVirtualDispatch() {
8181 x->isSink (source ()); // $ MISSING: ast,ir
8282}
8383
84- Top *identity (Top *top) {
84+ Top *identity (Top *top) { // $ ast-def=top
8585 return top;
8686}
8787
88- void callIdentityFunctions (Top *top, Bottom *bottom) {
88+ void callIdentityFunctions (Top *top, Bottom *bottom) { // $ ast-def=bottom ast-def=top
8989 identity (bottom)->isSink (source ()); // $ MISSING: ast,ir
9090 identity (top)->isSink (source ()); // no flow
9191}
@@ -120,7 +120,7 @@ namespace virtual_inheritance {
120120 struct Bottom : Middle {
121121 };
122122
123- void VirtualDispatch (Bottom *bottomPtr, Bottom &bottomRef) {
123+ void VirtualDispatch (Bottom *bottomPtr, Bottom &bottomRef) { // $ ast-def=bottomPtr ast-def=bottomRef
124124 // Because the inheritance from `Top` is virtual, the following casts go
125125 // directly from `Bottom` to `Top`, skipping `Middle`. That means we don't
126126 // get flow from a `Middle` value to the call qualifier.
0 commit comments