Assume the following example code
struct Bar {
int x, y, z;
};
int foo(const Bar& bar) {
return bar.x + bar.z;
}
Is there a way to automatically tell, that foo accesses x and z from bar, but not y? Maybe the compiler (any of gcc, clang, or msvc) can output something like that?