Should detect copies of nontrivial heavy objects returned from a call as const reference, but returned as value.
This can be common mistake when writing proxies, and then changing only 1 interface instead of two.
This can be expected behaviour when writing proxies that add something (like mutex locks), in such case behavior can be expected, so best would be to detect only functions that have only returnStmt.
I'm adding this here so, i wouldn't forget.
Example:
```
struct A
{
const std::string& getS() { return s; }
std::string s;
};
struct AProxy
{
AProxy(A& a) : a(a) {}
std::string getS() { return s.getS(); }
A& a;
};
```
Should detect copies of nontrivial heavy objects returned from a call as const reference, but returned as value.
This can be common mistake when writing proxies, and then changing only 1 interface instead of two.
This can be expected behaviour when writing proxies that add something (like mutex locks), in such case behavior can be expected, so best would be to detect only functions that have only returnStmt.
Check name is up to negotation.
I'm adding this here so, i wouldn't forget.
Example:
Should detect copies of nontrivial heavy objects returned from a call as const reference, but returned as value. This can be common mistake when writing proxies, and then changing only 1 interface instead of two. This can be expected behaviour when writing proxies that add something (like mutex locks), in such case behavior can be expected, so best would be to detect only functions that have only returnStmt.
Check name is up to negotation.