alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land.
Awesome! Thank you for the new check! There are a couple of nits, but I'll fix these before submitting the patch. ================ Comment at: clang-tidy/misc/MoveConstantArgumentCheck.cpp:42 @@ +41,3 @@ + auto MoveRange = CharSourceRange::getCharRange(CallMove->getSourceRange()); + auto FileMoveRange = Lexer::makeFileCharRange(MoveRange, SM, getLangOpts()); + if (!FileMoveRange.isValid()) { ---------------- s/auto/CharSourceRange/ ================ Comment at: clang-tidy/misc/MoveConstantArgumentCheck.cpp:47 @@ +46,3 @@ + bool IsVariable = isa<DeclRefExpr>(Arg); + DiagnosticBuilder DB = + diag(FileMoveRange.getBegin(), "std::move of the %select{|const }0" ---------------- I'd replace `DiagnosticBuilder DB` with `auto Diag` - this is more a local convention, not a general rule. ================ Comment at: clang-tidy/misc/MoveConstantArgumentCheck.cpp:57 @@ +56,3 @@ + Arg->getLocStart()), + SM, getLangOpts()); + CharSourceRange AfterArgumentsRange = Lexer::makeFileCharRange( ---------------- This can probably happen when `Arg` comes from another macro (or a macro argument). A test can be added later. http://reviews.llvm.org/D12031 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits