vbvictor wrote:

I think we should make a generalised check (with types that can be configure).
In LLVM I can think of `SourceLocation` which is small and should be passed by 
value too.
Also, pass by value should be applied to built-in integer/floats and pointers.

------------------------------------------------------------

Isn't this a misleading behavoir?

```cpp
void badFunctionMutable(MyOp &op) {
  op = newOp()
}
```

What if someone overrides `op` inside function - then the check produces FP?

https://github.com/llvm/llvm-project/pull/179882
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to