The idea is to provide (likely opt-in) switch to enable diagnostic of the following case: https://cppinsights.io/s/01568d5e.
Specifically I'm talking about implicit copy of a when calling foo.
I'm not sure where it is better to be implemented. As a part of compiler or probably clang-tidy.
Because in most of the cases people would be fine with this copying, it is definitely not something as generic as unaligned atomic access for example. Ideally something like perfsan )
Hi!
The idea is to provide (likely opt-in) switch to enable diagnostic of the following case: https://cppinsights.io/s/01568d5e.
Specifically I'm talking about implicit copy of `a` when calling `foo`.
I'm not sure where it is better to be implemented. As a part of compiler or probably clang-tidy.
Because in most of the cases people would be fine with this copying, it is definitely not something as generic as unaligned atomic access for example. Ideally something like perfsan )
Hi!
The idea is to provide (likely opt-in) switch to enable diagnostic of the following case: https://cppinsights.io/s/01568d5e. Specifically I'm talking about implicit copy of
a
when callingfoo
.I'm not sure where it is better to be implemented. As a part of compiler or probably clang-tidy. Because in most of the cases people would be fine with this copying, it is definitely not something as generic as unaligned atomic access for example. Ideally something like perfsan )