brintos

brintos / llvm-project-archived public Read only

0
0
Text · 593 B · d264152 Raw
10 lines · cpp
1// RUN: %check_clang_tidy -expect-clang-tidy-error %s bugprone-branch-clone %t2 3int test_unknown_expression() {4  if (unknown_expression_1) {        // CHECK-MESSAGES: :[[@LINE]]:7: error: use of undeclared identifier 'unknown_expression_1' [clang-diagnostic-error]5    function1(unknown_expression_2); // CHECK-MESSAGES: :[[@LINE]]:15: error: use of undeclared identifier 'unknown_expression_2' [clang-diagnostic-error]6  } else {7    function2(unknown_expression_3); // CHECK-MESSAGES: :[[@LINE]]:15: error: use of undeclared identifier 'unknown_expression_3' [clang-diagnostic-error]8  }9}10