1*89a1d03eSRichard // RUN: %check_clang_tidy %s cppcoreguidelines-init-variables,readability-isolate-declaration %t
2*89a1d03eSRichard
foo()3*89a1d03eSRichard void foo() {
4*89a1d03eSRichard int A, B, C;
5*89a1d03eSRichard // CHECK-MESSAGES-DAG: :[[@LINE-1]]:7: warning: variable 'A' is not initialized
6*89a1d03eSRichard // CHECK-MESSAGES-DAG: :[[@LINE-2]]:10: warning: variable 'B' is not initialized
7*89a1d03eSRichard // CHECK-MESSAGES-DAG: :[[@LINE-3]]:13: warning: variable 'C' is not initialized
8*89a1d03eSRichard // CHECK-MESSAGES-DAG: :[[@LINE-4]]:3: warning: multiple declarations in a single statement reduces readability
9*89a1d03eSRichard
10*89a1d03eSRichard // Only the isolate declarations fix-it should be applied
11*89a1d03eSRichard
12*89a1d03eSRichard // CHECK-FIXES: int A;
13*89a1d03eSRichard // CHECK-FIXES-NEXT: int B;
14*89a1d03eSRichard // CHECK-FIXES-NEXT: int C;
15*89a1d03eSRichard }
16