Quuxplusone added inline comments.
================ Comment at: clang-tools-extra/test/clang-tidy/checkers/misc-unconventional-assign-operator.cpp:151 + using Alias3 = TemplateTypeAlias<U>; + Alias3<T> &operator=(int) { return *this; } +}; ---------------- fwolff wrote: > whisperity wrote: > > This is a no-warn due to the parameter being a completely unrelated type, > > right? Might worth a comment. I don't see at first glance why a warning > > should not happen here. > Exactly. I've added a comment in the `TypeAlias` struct above, because that > one comes first. I've also updated the documentation for this check to make > this clearer. > This is a no-warn due to the parameter being a completely unrelated type, > right? No. If that were the case, this would be a terrible test case, full of irrelevant cruft. :) Once you look past all the levels of type aliases, this is equivalent to ``` template<class T> struct TTA { TTA<T>& operator=(int) { return *this; } }; ``` and so no warning is given because it's correct code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114197/new/ https://reviews.llvm.org/D114197 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits