Skip to content

Commit 49bfcae

Browse files
committed
[NFC] Add more testcase
1 parent 08fd8db commit 49bfcae

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

clang-tools-extra/test/clang-tidy/checkers/modernize/use-structured-binding.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ struct TestClass {
99
int a;
1010
int b;
1111
TestClass() : a(0), b(0) {}
12+
TestClass& operator++();
1213
TestClass(int x, int y) : a(x), b(y) {}
1314
};
1415

@@ -123,6 +124,12 @@ void forRangeNotWarnCases() {
123124
}
124125

125126
std::pair<TestClass, TestClass> ClassPairs[10];
127+
for (auto P : ClassPairs) {
128+
TestClass c1 = P.first;
129+
++ c1 ;
130+
TestClass c2 = P.second;
131+
}
132+
126133
int c;
127134
for (auto P : ClassPairs) {
128135
TestClass c1 = P.first;

0 commit comments

Comments
 (0)