cjdb added inline comments.
================ Comment at: clang-tools-extra/docs/clang-tidy/checks/misc-pod-const-ref-to-value.rst:21 + + If set to `true`, this check will limit itself to the `builtinType()` types. Default is `false`. ---------------- jmarrec wrote: > Quuxplusone wrote: > > D107873 is related. > > > > I'd like to see some tests/discussion around large types, e.g. > > ``` > > struct Widget { int a[1000]; }; > > void f(const Widget&); > > ``` > > (I think D107873 at least makes a conscious attempt to get the "would it be > > passed in registers?" check right.) > > > > I'd like to see some tests/discussion around generic code, e.g. > > ``` > > template<class T> > > struct Max { > > static T max(const T& a, const T& b); > > }; > > int x = Max<int>::max(1, 2); // passes `int` by const reference, but this > > is fine > > ``` > Should I close this one in favor of https://reviews.llvm.org/D107873? Up to you. There's always a chance that D107873 doesn't get approved. What I find most interesting is that we were independently working on this at the same time :-) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107900/new/ https://reviews.llvm.org/D107900 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits