☰
Debian Codegraph
@
1:19.1.7-22
1:19.1.7-20
/
/
clang-tools-extra
/
test
/
clang-tidy
/
checkers
/
bugprone
/
branch-clone-macro-crash.c
☽
☼
clang-tools-extra/test/clang-tidy/checkers/bugprone/branch-clone-macro-crash.c
code
plain
raw
APACHE-2-LLVM-EXCEPTIONS
2003-2017 University of Illinois at Urbana-Champaign.
debian/copyright
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
11
void f(void) {
12
// CHECK-MESSAGES: warning: repeated branch body in conditional chain [bugprone-branch-clone]
13
a(x, y)
14
}