1 // RUN: %check_clang_tidy %s bugprone-branch-clone %t 2 int x = 0; 3 int y = 1; 4 #define a(b, c) \ 5 typeof(b) d; \ 6 if (b) \ 7 d = b; \ 8 else if (c) \ 9 d = b; 10 f(void)11void f(void) { 12 // CHECK-MESSAGES: warning: repeated branch body in conditional chain [bugprone-branch-clone] 13 a(x, y) 14 } 15