how to instrument dmd compiler to dump all references to a given symbol?
Seb
seb at wilzba.ch
Sun Jan 14 03:29:04 UTC 2018
On Sunday, 14 January 2018 at 02:36:02 UTC, Timothee Cour wrote:
> eg:
>
> how to instrument dmd compiler to dump all references to a
> given symbol?
> eg: for `A.a` it should output the locations marked with HERE
> any help/starting points would be appreciated!
>
> ```
> Struct A{
> int a;
> void fun(){
> a++; // HERE
> alias b=a;
> b++; // HERE
> }
> }
>
> void fun(){
> int a; // NOT HERE
> A b;
> b.a ++ ; // HERE
> }
> ```
I don't know what you are trying to achieve, but `deprecated`
could work for you. At least it's an easy way to get all
locations using a symbol:
https://run.dlang.io/is/ICv9lH
More information about the Digitalmars-d
mailing list