Issue 140453
Summary [clang-tidy] "bugprone-return-const-ref-from-parameter" - should catch references to a field of parameter in return
Labels clang-tidy
Assignees
Reporter denzor200
    This check is expected to show warning in this function:
```
struct S {
  int v;
  S(int);
  ~S();
};

const int &fn2(const S &a) {
  return a.v;
}
```
But it didn't. The full snippet here: https://godbolt.org/z/h6dv7fqEn
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to