Index: clang-tools-extra/trunk/test/clang-tidy/bugprone-forwarding-reference-overload.cpp =================================================================== --- clang-tools-extra/trunk/test/clang-tidy/bugprone-forwarding-reference-overload.cpp +++ clang-tools-extra/trunk/test/clang-tidy/bugprone-forwarding-reference-overload.cpp @@ -20,27 +20,34 @@ class Test1 { public: template Test1(T &&n); - // CHECK-MESSAGES: :[[@LINE-1]]:25: warning: constructor accepting a forwarding reference can hide the copy and move constructors [bugprone-forwarding-reference-overload] + // CHECK-NOTES: [[@LINE-1]]:25: warning: constructor accepting a forwarding reference can hide the copy and move constructors [bugprone-forwarding-reference-overload] + // CHECK-NOTES: 48:3: note: copy constructor declared here + // CHECK-NOTES: 49:3: note: copy constructor declared here + // CHECK-NOTES: 50:3: note: move constructor declared here template Test1(T &&n, int i = 5, ...); - // CHECK-MESSAGES: :[[@LINE-1]]:25: warning: constructor accepting a forwarding reference can hide the copy and move constructors + // CHECK-NOTES: :[[@LINE-1]]:25: warning: constructor accepting a forwarding reference can hide the copy and move constructors + // CHECK-NOTES: 48:3: note: copy constructor declared here + // CHECK-NOTES: 49:3: note: copy constructor declared here + // CHECK-NOTES: 50:3: note: move constructor declared here template ::type> Test1(T &&n); - // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: constructor accepting a forwarding reference can hide the copy and move constructors + // CHECK-NOTES: :[[@LINE-1]]:3: warning: constructor accepting a forwarding reference can hide the copy and move constructors + // CHECK-NOTES: 48:3: note: copy constructor declared here + // CHECK-NOTES: 49:3: note: copy constructor declared here + // CHECK-NOTES: 50:3: note: move constructor declared here template Test1(T &&n, typename foo::enable_if::type i = 5, ...); - // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: constructor accepting a forwarding reference can hide the copy and move constructors + // CHECK-NOTES: :[[@LINE-1]]:3: warning: constructor accepting a forwarding reference can hide the copy and move constructors + // CHECK-NOTES: 48:3: note: copy constructor declared here + // CHECK-NOTES: 49:3: note: copy constructor declared here + // CHECK-NOTES: 50:3: note: move constructor declared here Test1(const Test1 &other) {} - // CHECK-MESSAGES: :[[@LINE-1]]:3: note: copy constructor declared here - Test1(Test1 &other) {} - // CHECK-MESSAGES: :[[@LINE-1]]:3: note: copy constructor declared here - Test1(Test1 &&other) {} - // CHECK-MESSAGES: :[[@LINE-1]]:3: note: move constructor declared here }; template class Test2 { @@ -96,10 +103,10 @@ class Test4 { public: template Test4(T &&n); - // CHECK-MESSAGES: :[[@LINE-1]]:25: warning: constructor accepting a forwarding reference can hide the copy and move constructors + // CHECK-NOTES: :[[@LINE-1]]:25: warning: constructor accepting a forwarding reference can hide the copy and move constructors Test4(const Test4 &rhs); - // CHECK-MESSAGES: :[[@LINE-1]]:3: note: copy constructor declared here + // CHECK-NOTES: :[[@LINE-1]]:3: note: copy constructor declared here }; // Nothing can be hidden, the copy constructor is implicitly deleted. @@ -114,10 +121,10 @@ class Test6 { public: template Test6(T &&n); - // CHECK-MESSAGES: :[[@LINE-1]]:25: warning: constructor accepting a forwarding reference can hide the move constructor + // CHECK-NOTES: :[[@LINE-1]]:25: warning: constructor accepting a forwarding reference can hide the move constructor Test6(Test6 &&rhs); - // CHECK-MESSAGES: :[[@LINE-1]]:3: note: move constructor declared here + // CHECK-NOTES: :[[@LINE-1]]:3: note: move constructor declared here private: Test6(const Test6 &rhs); }; @@ -141,5 +148,5 @@ public: template > constexpr variant(_Arg&& __arg) {} - // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: constructor accepting a forwarding reference can hide the copy and move constructors + // CHECK-NOTES: :[[@LINE-1]]:13: warning: constructor accepting a forwarding reference can hide the copy and move constructors };