comparison clang/test/Analysis/disable-all-checks.c @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900 (2022-11-09)
parents 1d019706d866
children
comparison
equal deleted inserted replaced
232:70dce7da266c 236:c4bab56944e8
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-store=region \ 1 // RUN: %clang_analyze_cc1 -analyzer-checker=core \
2 // RUN: -analyzer-disable-all-checks -verify %s 2 // RUN: -analyzer-disable-all-checks -verify %s
3 // 3 //
4 // RUN: %clang_analyze_cc1 -analyzer-disable-all-checks -analyzer-checker=core \ 4 // RUN: %clang_analyze_cc1 -analyzer-disable-all-checks -analyzer-checker=core \
5 // RUN: -analyzer-store=region -verify %s 5 // RUN: -verify %s
6 // 6 //
7 // RUN: %clang_analyze_cc1 -analyzer-disable-all-checks -verify %s 7 // RUN: %clang_analyze_cc1 -analyzer-disable-all-checks -verify %s
8 // 8 //
9 // RUN: not %clang_analyze_cc1 -analyzer-checker=core -analyzer-store=region \ 9 // RUN: not %clang_analyze_cc1 -analyzer-checker=core \
10 // RUN: -analyzer-disable-checker non.existant.Checker -verify %s 2>&1 \ 10 // RUN: -analyzer-disable-checker non.existant.Checker -verify %s 2>&1 \
11 // RUN: | FileCheck %s 11 // RUN: | FileCheck %s
12 // 12 //
13 // expected-no-diagnostics 13 // expected-no-diagnostics
14 14
15 // CHECK: no analyzer checkers or packages are associated with 'non.existant.Checker' 15 // CHECK: no analyzer checkers or packages are associated with 'non.existant.Checker'
16 // CHECK: use -analyzer-disable-all-checks to disable all static analyzer checkers 16 // CHECK: use -analyzer-disable-all-checks to disable all static analyzer checkers
17 int buggy() { 17 int buggy(void) {
18 int x = 0; 18 int x = 0;
19 return 5/x; // no warning 19 return 5/x; // no warning
20 } 20 }