annotate clang/test/Driver/analyzer-target-enabled-checkers.cpp @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // Tests for static analyzer checkers that the driver enables by default based
anatofuz
parents:
diff changeset
2 // on the target triple.
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 // RUN: %clang -### -target x86_64-apple-darwin10 --analyze %s 2>&1 | FileCheck --check-prefix=CHECK-DARWIN %s
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 // CHECK-DARWIN: "-analyzer-checker=core"
anatofuz
parents:
diff changeset
7 // CHECK-DARWIN-SAME: "-analyzer-checker=apiModeling"
anatofuz
parents:
diff changeset
8 // CHECK-DARWIN-SAME: "-analyzer-checker=unix"
anatofuz
parents:
diff changeset
9 // CHECK-DARWIN-SAME: "-analyzer-checker=osx"
anatofuz
parents:
diff changeset
10 // CHECK-DARWIN-SAME: "-analyzer-checker=deadcode"
anatofuz
parents:
diff changeset
11 // CHECK-DARWIN-SAME: "-analyzer-checker=cplusplus"
anatofuz
parents:
diff changeset
12 // CHECK-DARWIN-SAME: "-analyzer-checker=security.insecureAPI.UncheckedReturn"
anatofuz
parents:
diff changeset
13 // CHECK-DARWIN-SAME: "-analyzer-checker=security.insecureAPI.getpw"
anatofuz
parents:
diff changeset
14 // CHECK-DARWIN-SAME: "-analyzer-checker=security.insecureAPI.gets"
anatofuz
parents:
diff changeset
15 // CHECK-DARWIN-SAME: "-analyzer-checker=security.insecureAPI.mktemp"
anatofuz
parents:
diff changeset
16 // CHECK-DARWIN-SAME: "-analyzer-checker=security.insecureAPI.mkstemp"
anatofuz
parents:
diff changeset
17 // CHECK-DARWIN-SAME: "-analyzer-checker=security.insecureAPI.vfork"
anatofuz
parents:
diff changeset
18 // CHECK-DARWIN-SAME: "-analyzer-checker=nullability.NullPassedToNonnull"
anatofuz
parents:
diff changeset
19 // CHECK-DARWIN-SAME: "-analyzer-checker=nullability.NullReturnedFromNonnull"
anatofuz
parents:
diff changeset
20
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 // RUN: %clang -### -target x86_64-unknown-linux --analyze %s 2>&1 | FileCheck --check-prefix=CHECK-LINUX %s
anatofuz
parents:
diff changeset
23
anatofuz
parents:
diff changeset
24 // CHECK-LINUX: "-analyzer-checker=core"
anatofuz
parents:
diff changeset
25 // CHECK-LINUX-SAME: "-analyzer-checker=apiModeling"
anatofuz
parents:
diff changeset
26 // CHECK-LINUX-SAME: "-analyzer-checker=unix"
anatofuz
parents:
diff changeset
27 // CHECK-LINUX-NOT: "-analyzer-checker=osx"
anatofuz
parents:
diff changeset
28 // CHECK-LINUX-SAME: "-analyzer-checker=deadcode"
anatofuz
parents:
diff changeset
29 // CHECK-LINUX-SAME: "-analyzer-checker=cplusplus"
anatofuz
parents:
diff changeset
30 // CHECK-LINUX-SAME: "-analyzer-checker=security.insecureAPI.UncheckedReturn"
anatofuz
parents:
diff changeset
31 // CHECK-LINUX-SAME: "-analyzer-checker=security.insecureAPI.getpw"
anatofuz
parents:
diff changeset
32 // CHECK-LINUX-SAME: "-analyzer-checker=security.insecureAPI.gets"
anatofuz
parents:
diff changeset
33 // CHECK-LINUX-SAME: "-analyzer-checker=security.insecureAPI.mktemp"
anatofuz
parents:
diff changeset
34 // CHECK-LINUX-SAME: "-analyzer-checker=security.insecureAPI.mkstemp"
anatofuz
parents:
diff changeset
35 // CHECK-LINUX-SAME: "-analyzer-checker=security.insecureAPI.vfork"
anatofuz
parents:
diff changeset
36 // CHECK-LINUX-SAME: "-analyzer-checker=nullability.NullPassedToNonnull"
anatofuz
parents:
diff changeset
37 // CHECK-LINUX-SAME: "-analyzer-checker=nullability.NullReturnedFromNonnull"
anatofuz
parents:
diff changeset
38
anatofuz
parents:
diff changeset
39
anatofuz
parents:
diff changeset
40 // RUN: %clang -### -target x86_64-windows --analyze %s 2>&1 | FileCheck --check-prefix=CHECK-WINDOWS %s
anatofuz
parents:
diff changeset
41
anatofuz
parents:
diff changeset
42 // CHECK-WINDOWS: "-analyzer-checker=core"
anatofuz
parents:
diff changeset
43 // CHECK-WINDOWS-SAME: "-analyzer-checker=apiModeling"
anatofuz
parents:
diff changeset
44 // CHECK-WINDOWS-SAME: "-analyzer-checker=unix.API"
anatofuz
parents:
diff changeset
45 // CHECK-WINDOWS-SAME: "-analyzer-checker=unix.Malloc"
anatofuz
parents:
diff changeset
46 // CHECK-WINDOWS-SAME: "-analyzer-checker=unix.MallocSizeof"
anatofuz
parents:
diff changeset
47 // CHECK-WINDOWS-SAME: "-analyzer-checker=unix.MismatchedDeallocator"
anatofuz
parents:
diff changeset
48 // CHECK-WINDOWS-SAME: "-analyzer-checker=unix.cstring.BadSizeArg"
anatofuz
parents:
diff changeset
49 // CHECK-WINDOWS-SAME: "-analyzer-checker=unix.cstring.NullArg"
anatofuz
parents:
diff changeset
50 // CHECK-WINDOWS-NOT: "-analyzer-checker=osx"
anatofuz
parents:
diff changeset
51 // CHECK-WINDOWS-SAME: "-analyzer-checker=deadcode"
anatofuz
parents:
diff changeset
52 // CHECK-WINDOWS-SAME: "-analyzer-checker=cplusplus"
anatofuz
parents:
diff changeset
53 // CHECK-WINDOWS-SAME: "-analyzer-checker=security.insecureAPI.UncheckedReturn"
anatofuz
parents:
diff changeset
54 // CHECK-WINDOWS-SAME: "-analyzer-checker=security.insecureAPI.getpw"
anatofuz
parents:
diff changeset
55 // CHECK-WINDOWS-SAME: "-analyzer-checker=security.insecureAPI.gets"
anatofuz
parents:
diff changeset
56 // CHECK-WINDOWS-SAME: "-analyzer-checker=security.insecureAPI.mktemp"
anatofuz
parents:
diff changeset
57 // CHECK-WINDOWS-SAME: "-analyzer-checker=security.insecureAPI.mkstemp"
anatofuz
parents:
diff changeset
58 // CHECK-WINDOWS-SAME: "-analyzer-checker=security.insecureAPI.vfork"
anatofuz
parents:
diff changeset
59 // CHECK-WINDOWS-SAME: "-analyzer-checker=nullability.NullPassedToNonnull"
anatofuz
parents:
diff changeset
60 // CHECK-WINDOWS-SAME: "-analyzer-checker=nullability.NullReturnedFromNonnull"