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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 11 08:26:29 PST 2015


aaron.ballman added inline comments.

================
Comment at: clang-tidy/misc/MoveConstantArgumentCheck.cpp:11
@@ +10,3 @@
+#include "MoveConstantArgumentCheck.h"
+
+namespace clang {
----------------
> I didn't find how it can be done, could you please advice?

This is the usual way we do it (in the registerMatchers() function):
```
  if (!getLangOpts().CPlusPlus)
    return;
```


================
Comment at: test/clang-tidy/move-const-arg.cpp:1
@@ +1,2 @@
+// RUN: %check_clang_tidy %s misc-move-const-arg %t -- -- -std=c++11
+
----------------
Please run clang-format over the test files as well.


http://reviews.llvm.org/D12031





More information about the cfe-commits mailing list