1 | // RUN: %check_clang_tidy -expect-clang-tidy-error %s bugprone-branch-clone %t |
2 | |
3 | int 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 | |