Skip to content

Commit 9babb88

Browse files
committed
try to fix buildbot failure
1 parent 8f2c2d0 commit 9babb88

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang-tools-extra/test/clang-tidy/checkers/bugprone/misleading-setter-of-reference.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,15 @@ template <typename T>
9191
class TemplateTest {
9292
T &Mem;
9393
public:
94+
TemplateTest(T &V) : Mem{V} {}
9495
void setValue(T *NewValue) {
9596
// 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
9697
Mem = *NewValue;
9798
}
9899
};
99100

100-
void f_TTChar(TemplateTest<char> *);
101-
void f_TTChar(TemplateTest<float> *);
101+
char CharValue;
102+
TemplateTest<char> TTChar{CharValue};
102103

103104
template <typename T>
104105
class AddMember {

0 commit comments

Comments
 (0)