diff options
author | Alexander Kornienko <alexfh@google.com> | 2014-10-26 02:58:07 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2014-10-26 02:58:07 +0000 |
commit | 106c8e0898688fbdff96b017828da9762f1d6b20 (patch) | |
tree | fffad8ed33e1c3b61cc356c645434bbfe2465afd /clang-tools-extra/test/clang-tidy/misc-undelegated-constructor.cpp | |
parent | 6775ce3ad3e9bf3e2598143b7cac4b5ecdaafa93 (diff) | |
download | bcm5719-llvm-106c8e0898688fbdff96b017828da9762f1d6b20.tar.gz bcm5719-llvm-106c8e0898688fbdff96b017828da9762f1d6b20.zip |
[clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh
Summary: Make the script suitable for checking just messages. Move most of the tests to use it. Clean up the tests: shorten messages, insert line numbers, remove unnecessary RUN: lines, etc.
Reviewers: klimek
Reviewed By: klimek
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D5989
llvm-svn: 220634
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/misc-undelegated-constructor.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/misc-undelegated-constructor.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/clang-tools-extra/test/clang-tidy/misc-undelegated-constructor.cpp b/clang-tools-extra/test/clang-tidy/misc-undelegated-constructor.cpp index 09d683b8e75..7bed88aea71 100644 --- a/clang-tools-extra/test/clang-tidy/misc-undelegated-constructor.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-undelegated-constructor.cpp @@ -1,4 +1,5 @@ -// RUN: clang-tidy -checks='-*,misc-undelegated-constructor' %s -- -std=c++11 2>&1 | FileCheck %s -implicit-check-not='{{warning:|error:}}' +// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-undelegated-constructor %t +// REQUIRES: shell struct Ctor; Ctor foo(); @@ -9,18 +10,18 @@ struct Ctor { Ctor(int, int); Ctor(Ctor *i) { Ctor(); -// CHECK: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor? A temporary object is created here instead +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor? A temporary object is created here instead [misc-undelegated-constructor] Ctor(0); -// CHECK: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor? A temporary object is created here instead +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor? Ctor(1, 2); -// CHECK: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor? A temporary object is created here instead +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor? foo(); } }; Ctor::Ctor() { Ctor(1); -// CHECK: :[[@LINE-1]]:3: warning: did you intend to call a delegated constructor? A temporary object is created here instead +// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: did you intend to call a delegated constructor? } Ctor::Ctor(int i) : Ctor(i, 1) {} // properly delegated. @@ -31,11 +32,11 @@ struct Dtor { Dtor(int, int); Dtor(Ctor *i) { Dtor(); -// CHECK: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor? A temporary object is created here instead +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor? Dtor(0); -// CHECK: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor? A temporary object is created here instead +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor? Dtor(1, 2); -// CHECK: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor? A temporary object is created here instead +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor? } ~Dtor(); }; @@ -43,7 +44,7 @@ struct Dtor { struct Base {}; struct Derived : public Base { Derived() { Base(); } -// CHECK: :[[@LINE-1]]:15: warning: did you intend to call a delegated constructor? A temporary object is created here instead +// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: did you intend to call a delegated constructor? }; template <typename T> |