brintos

brintos / llvm-project-archived public Read only

0
0
Text · 316 B · 0f4389c Raw
15 lines · c
1// RUN: %check_clang_tidy %s bugprone-branch-clone %t2int 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