[PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'
Martin Böhme via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 17 08:43:20 PDT 2016
mboehme marked 2 inline comments as done.
================
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);
----------------
alexfh wrote:
> 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 ;)
Agree -- I'm just used to putting the braces in there. ;)
I went through and cleaned up a bunch of these -- hope I found them all.
https://reviews.llvm.org/D23353
More information about the cfe-commits
mailing list