summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/misc-undelegated-constructor.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2018-02-28 23:47:15 +0000
committerAlexander Kornienko <alexfh@google.com>2018-02-28 23:47:15 +0000
commiteb9d944419a6048fdbd20b4d7766552df92b7f2a (patch)
treebfce3e00bcd75d1a2c4cefcee68803c6e15ea370 /clang-tools-extra/test/clang-tidy/misc-undelegated-constructor.cpp
parent51ec5a9ce35ac7dcb8c88d4cdfff100d86e72457 (diff)
downloadbcm5719-llvm-eb9d944419a6048fdbd20b4d7766552df92b7f2a.tar.gz
bcm5719-llvm-eb9d944419a6048fdbd20b4d7766552df92b7f2a.zip
[clang-tidy] Another batch of checks to rename from misc- to bugprone-.
Summary: clang-tidy/rename_check.py {misc,bugprone}-suspicious-semicolon clang-tidy/rename_check.py {misc,bugprone}-suspicious-string-compare clang-tidy/rename_check.py {misc,bugprone}-swapped-arguments clang-tidy/rename_check.py {misc,bugprone}-undelegated-constructor --check_class_name UndelegatedConstructor Reviewers: hokein, sammccall, aaron.ballman Subscribers: klimek, mgorny, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D43870 llvm-svn: 326386
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.cpp54
1 files changed, 0 insertions, 54 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
deleted file mode 100644
index 1b5e3c4c641..00000000000
--- a/clang-tools-extra/test/clang-tidy/misc-undelegated-constructor.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// RUN: %check_clang_tidy %s misc-undelegated-constructor %t
-
-struct Ctor;
-Ctor foo();
-
-struct Ctor {
- Ctor();
- Ctor(int);
- Ctor(int, int);
- Ctor(Ctor *i) {
- Ctor();
-// 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-MESSAGES: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor?
- Ctor(1, 2);
-// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor?
- foo();
- }
-};
-
-Ctor::Ctor() {
- Ctor(1);
-// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: did you intend to call a delegated constructor?
-}
-
-Ctor::Ctor(int i) : Ctor(i, 1) {} // properly delegated.
-
-struct Dtor {
- Dtor();
- Dtor(int);
- Dtor(int, int);
- Dtor(Ctor *i) {
- Dtor();
-// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor?
- Dtor(0);
-// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor?
- Dtor(1, 2);
-// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor?
- }
- ~Dtor();
-};
-
-struct Base {};
-struct Derived : public Base {
- Derived() { Base(); }
-// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: did you intend to call a delegated constructor?
-};
-
-template <typename T>
-struct TDerived : public Base {
- TDerived() { Base(); }
-};
-
-TDerived<int> t;
OpenPOWER on IntegriCloud