[PATCH] D75901: [clang-tidy] misc-unconventional-assign-operator suggest to use rvalue references in C++03 mode

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 10 10:53:15 PDT 2020


njames93 added a comment.

If you need help for the test case. Create a file in the `clang-tools-extra/test/clang-tidy/checkers`. 
Name it something like `misc-unconventional-assign-operator-pre11.cpp` and paste this in

  // RUN: %check_clang_tidy -std=c++98,c++03 %s misc-unconventional-assign-operator %t
  
  struct BadArgument {
    BadArgument& operator=(BadArgument&);
    // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: operator=() should take 'BadArgument const&' or 'BadArgument'
  };


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75901/new/

https://reviews.llvm.org/D75901





More information about the cfe-commits mailing list