Yep, here it is. Warning happens only for strong purity.
https://github.com/D-Programming-Language/dmd/blob/89ca0a14eb2b0a3e232a2eded5f43693d02510e3/src/sideeffect.c#L90
Also I think strong purity is required to allow implicit cast of the return value to immutable, so it's definitely a desired property, e.g. one should be able to do `string s = "foobar".dup`.