[PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 28 07:36:35 PDT 2016
aaron.ballman added a subscriber: aaron.ballman.
aaron.ballman added a reviewer: aaron.ballman.
================
Comment at: clang-tidy/misc/AssignOperatorCheck.cpp:74
@@ +73,3 @@
+ } else {
+ std::string Name = Method->getParent()->getName();
+
----------------
This can be lowered into the if statement in place of Name.
================
Comment at: clang-tidy/misc/AssignOperatorCheck.h:19
@@ +18,3 @@
+
+/// Finds declarations of assign operators with the wrong return and/or argument
+/// types.
----------------
s/assign/assignment.
================
Comment at: test/clang-tidy/misc-assign-operator.cpp:15
@@ +14,3 @@
+ // By value is also fine.
+ AlsoGood& operator=(AlsoGood);
+};
----------------
This seems at odds with the core guidelines for cppcoreguidelines-c-copy-assignment-signature.
http://reviews.llvm.org/D18265
More information about the cfe-commits
mailing list