diff options
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> |