2016-03-02 17:01:25 +08:00
|
|
|
// RUN: cp %S/Inputs/modernize-pass-by-value/header.h %T/pass-by-value-header.h
|
|
|
|
// 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}}:"
|
|
|
|
// RUN: FileCheck -input-file=%T/pass-by-value-header.h %s -check-prefix=CHECK-FIXES
|
|
|
|
|
|
|
|
#include "pass-by-value-header.h"
|
2017-01-13 03:20:35 +08:00
|
|
|
// CHECK-MESSAGES: :8:5: warning: pass by value and use std::move [modernize-pass-by-value]
|
2016-03-02 17:01:25 +08:00
|
|
|
// CHECK-FIXES: #include <utility>
|
|
|
|
// CHECK-FIXES: A(ThreadId tid) : threadid(std::move(tid)) {}
|