Create new diagnostic group -Wmove
authorRichard Trieu <rtrieu@google.com>
Mon, 18 May 2015 20:25:44 +0000 (20:25 +0000)
committerRichard Trieu <rtrieu@google.com>
Mon, 18 May 2015 20:25:44 +0000 (20:25 +0000)
-Wmove includes the three existing warnings for std::move calls, self move,
reduntant move, and pessimizing move.  -Wmove is included in -Wmost, so that
it can be discoverable to people using that or -Wall.

Differential Revision: http://reviews.llvm.org/D9493

llvm-svn: 237610

clang/include/clang/Basic/DiagnosticGroups.td

index 7abb533..61436ea 100644 (file)
@@ -577,6 +577,8 @@ def IntToVoidPointerCast : DiagGroup<"int-to-void-pointer-cast">;
 def IntToPointerCast : DiagGroup<"int-to-pointer-cast",
                                  [IntToVoidPointerCast]>;
 
+def Move : DiagGroup<"move", [PessimizingMove, RedundantMove, SelfMove]>;
+
 def Extra : DiagGroup<"extra", [
     MissingFieldInitializers,
     IgnoredQualifiers,
@@ -595,6 +597,7 @@ def Most : DiagGroup<"most", [
     Implicit,
     MismatchedTags,
     MissingBraces,
+    Move,
     MultiChar,
     Reorder,
     ReturnType,