1 // RUN: %clang_analyze_cc1 -analyzer-checker=core %s 2>&1 \ 2 // RUN: | FileCheck %s --check-prefixes=CHECK 3 4 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-store=region %s 2>&1 \ 5 // RUN: | FileCheck %s --check-prefixes=CHECK,DEPRECATED-STORE 6 // DEPRECATED-STORE: warning: analyzer option '-analyzer-store' is deprecated. This flag will be removed in clang-16, and passing this option will be an error. 7 8 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-opt-analyze-nested-blocks %s 2>&1 \ 9 // RUN: | FileCheck %s --check-prefixes=CHECK,DEPRECATED-NESTED-BLOCKS 10 // DEPRECATED-NESTED-BLOCKS: warning: analyzer option '-analyzer-opt-analyze-nested-blocks' is deprecated. This flag will be removed in clang-16, and passing this option will be an error. 11 12 // RUN: %clang_analyze_cc1 -analyzer-checker=core %s --help 2>&1 \ 13 // RUN: | FileCheck %s --check-prefixes=CHECK-HELP 14 // CHECK-HELP: Analyze the definitions of blocks in addition to functions [DEPRECATED, removing in clang-16] 15 // CHECK-HELP: -analyzer-store <value> Source Code Analysis - Abstract Memory Store Models [DEPRECATED, removing in clang-16] 16 17 int empty(int x) { 18 // CHECK: warning: Division by zero 19 return x ? 0 : 0 / x; 20 } 21