| 1 |
// RUN: cp %S/Inputs/pass-by-value/header.h %T/pass-by-value-header.h |
| 2 |
// RUN: clang-tidy %s -checks='-*,modernize-pass-by-value' -header-filter='.*' -fix -- -std=c++11 -I %T | FileCheck %s -check-prefix=CHECK-MESSAGES -implicit-check-not="{{warning|error}}:" |
| 3 |
// RUN: FileCheck -input-file=%T/pass-by-value-header.h %s -check-prefix=CHECK-FIXES |
| 4 |
// FIXME: Make the test work in all language modes. |
| 5 |
|
| 6 |
#include "pass-by-value-header.h" |
| 7 |
// CHECK-MESSAGES: :8:5: warning: pass by value and use std::move [modernize-pass-by-value] |
| 8 |
// CHECK-FIXES: #include <utility> |
| 9 |
// CHECK-FIXES: A(ThreadId tid) : threadid(std::move(tid)) {} |