Does this C++ static analysis rule make sense as is?
问题 I'm implementing some C++ static analysis rules, and one of them prohibits a function from returning a reference or pointer to a reference parameter of the function, i.e. the following are all non-compliant: int *f(int& x) { return &x; } // #1 const int *g(const int& x) { return &x; } // #2 int& h(int& x) { return x; } // #3 const int& m(const int& x) { return x; } // #4 The justification given for this is that "It is implementation-defined behaviour whether the reference parameter is a