[clang-tools-extra] [clang-tidy] Fix false positives with template in `misc-unconventional-assign-operator` check (PR #143292)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 4 00:15:05 PDT 2025


================
@@ -163,3 +163,16 @@ struct TemplateTypeAlias {
   Alias3<TypeAlias::Alias> &operator=(double) { return *this; }
   // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: operator=() should return 'TemplateTypeAlias&' [misc-unconventional-assign-operator]
 };
+
+namespace issue143237 {
+template<typename T>
+struct B {
----------------
vbvictor wrote:

Could you give this class a meaningful name?
E.g. `TemplateAssignment`.


https://github.com/llvm/llvm-project/pull/143292


More information about the cfe-commits mailing list