[PATCH] D12031: Const std::move() argument ClangTidy check

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 25 08:00:05 PST 2015


alexfh added a comment.

Missed a couple of comments. Anyway, I'm fixing these myself as a part of commit.


================
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()) {
----------------
alexfh wrote:
> s/auto/CharSourceRange/
... or do the reverse below on lines 54, 58.

================
Comment at: clang-tidy/misc/MoveConstantArgumentCheck.cpp:43
@@ +42,3 @@
+    auto FileMoveRange = Lexer::makeFileCharRange(MoveRange, SM, getLangOpts());
+    if (!FileMoveRange.isValid()) {
+      return;
----------------
It's not common for LLVM style to put braces around single-line bodies of loops and  conditional statements.


Repository:
  rL LLVM

http://reviews.llvm.org/D12031





More information about the cfe-commits mailing list