1// RUN: %check_clang_tidy %s bugprone-branch-clone %t
2int x = 0;
3int 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
11void f(void) {
12 // CHECK-MESSAGES: warning: repeated branch body in conditional chain [bugprone-branch-clone]
13 a(x, y)
14}
15

source code of clang-tools-extra/test/clang-tidy/checkers/bugprone/branch-clone-macro-crash.c