]> granicus.if.org Git - clang/commitdiff
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237610 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticGroups.td

index 7abb53353e8051994145785157a30f138adcff78..61436eabe52aff51140badc4d88041729d395bc4 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,