[PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 17 03:03:26 PDT 2016


alexfh added inline comments.

================
Comment at: clang-tidy/misc/UseAfterMoveCheck.cpp:659
@@ +658,3 @@
+  UseAfterMove Use;
+  if (finder.find(FunctionBody, MovingCall, MovedVariable, &Use)) {
+    emitDiagnostic(MovingCall, MovedVariable, Use, this, Result.Context);
----------------
omtcyfz wrote:
> Nit: As I discussed with Alex, it is better to omit `{}` in conditional statements if the body only contains one statement. Even if it wasn't so, it'd be better to use one "style" (i.e. either always omit `{}` or always have `{}`) at least inside a single check and you have no `{}` in many places inside this file (L637, L647, L577, ...).
> 
> Just a stylistic thing, doesn't matter too much, though.
I always say "single-line", not "single statement", which is a bit different ;) 


https://reviews.llvm.org/D23353





More information about the cfe-commits mailing list