You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clang-tools-extra/test/clang-tidy/checkers/bugprone/misleading-setter-of-reference.cpp
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -91,14 +91,15 @@ template <typename T>
91
91
classTemplateTest {
92
92
T &Mem;
93
93
public:
94
+
TemplateTest(T &V) : Mem{V} {}
94
95
voidsetValue(T *NewValue) {
95
96
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: function 'setValue' can be mistakenly used in order to change the reference 'Mem' instead of the value of it
0 commit comments