Skip to content

Commit 8cac8da

Browse files
committed
[NFC] Add test about multi VarDecl in one DeclStmt
1 parent d2991c4 commit 8cac8da

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/init-variables.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,5 +162,9 @@ namespace gh161978 {
162162
bool (*fp4)(int, int, int, ...);
163163
// CHECK-MESSAGES: :[[@LINE-1]]:12: warning: variable 'fp4' is not initialized [cppcoreguidelines-init-variables]
164164
// CHECK-FIXES: bool (*fp4)(int, int, int, ...) = nullptr;
165+
bool (*fp5)(int, int), (*fp6)(int, int);
166+
// CHECK-MESSAGES: :[[@LINE-1]]:12: warning: variable 'fp5' is not initialized [cppcoreguidelines-init-variables]
167+
// CHECK-MESSAGES: :[[@LINE-2]]:30: warning: variable 'fp6' is not initialized [cppcoreguidelines-init-variables]
168+
// CHECK-FIXES: bool (*fp5)(int, int) = nullptr, (*fp6)(int, int) = nullptr;
165169
}
166170
}

0 commit comments

Comments
 (0)