Googler | 7f19b2b | 2023-05-01 09:44:57 -0700 | [diff] [blame] | 1 | # Verification and Inference for null safety |
Wei Yi Tee | 543af74 | 2022-06-01 06:52:24 -0700 | [diff] [blame] | 2 | |
Lukasz Anforowicz | aaa2a0f | 2023-04-11 09:01:14 -0700 | [diff] [blame] | 3 | package(default_applicable_licenses = ["//:license"]) |
Googler | b1f1ce1 | 2023-02-17 15:37:52 -0800 | [diff] [blame] | 4 | |
Wei Yi Tee | 543af74 | 2022-06-01 06:52:24 -0700 | [diff] [blame] | 5 | cc_library( |
Dani Ferreira Franco Moura | 3d56a22 | 2022-11-29 03:12:55 -0800 | [diff] [blame] | 6 | name = "pointer_nullability_lattice", |
Googler | 0b222ba | 2023-11-03 08:02:58 -0700 | [diff] [blame] | 7 | srcs = ["pointer_nullability_lattice.cc"], |
Dani Ferreira Franco Moura | 3d56a22 | 2022-11-29 03:12:55 -0800 | [diff] [blame] | 8 | hdrs = ["pointer_nullability_lattice.h"], |
Googler | 60745f5 | 2023-06-26 11:31:39 -0700 | [diff] [blame] | 9 | visibility = [ |
| 10 | "//nullability/inference:__pkg__", |
| 11 | "//nullability/test:__pkg__", |
| 12 | ], |
Dani Ferreira Franco Moura | 97f5c61 | 2022-12-17 13:28:24 -0800 | [diff] [blame] | 13 | deps = [ |
Sam McCall | d127f93 | 2023-05-02 07:15:27 -0700 | [diff] [blame] | 14 | ":type_nullability", |
Googler | f7154ea | 2023-12-11 09:30:25 -0800 | [diff] [blame] | 15 | "@absl//absl/base:nullability", |
Dani Ferreira Franco Moura | 97f5c61 | 2022-12-17 13:28:24 -0800 | [diff] [blame] | 16 | "@absl//absl/container:flat_hash_map", |
Googler | d443731 | 2023-01-17 15:10:29 -0800 | [diff] [blame] | 17 | "@absl//absl/log:check", |
Dani Ferreira Franco Moura | 97f5c61 | 2022-12-17 13:28:24 -0800 | [diff] [blame] | 18 | "@llvm-project//clang:analysis", |
Sam McCall | 74bf864 | 2023-06-16 11:21:42 -0700 | [diff] [blame] | 19 | "@llvm-project//clang:ast", |
Googler | 2c9f53f | 2023-10-24 07:33:00 -0700 | [diff] [blame] | 20 | "@llvm-project//clang:basic", |
| 21 | "@llvm-project//llvm:Support", |
Dani Ferreira Franco Moura | 97f5c61 | 2022-12-17 13:28:24 -0800 | [diff] [blame] | 22 | ], |
Dani Ferreira Franco Moura | 3d56a22 | 2022-11-29 03:12:55 -0800 | [diff] [blame] | 23 | ) |
| 24 | |
| 25 | cc_library( |
Wei Yi Tee | 543af74 | 2022-06-01 06:52:24 -0700 | [diff] [blame] | 26 | name = "pointer_nullability_matchers", |
| 27 | srcs = ["pointer_nullability_matchers.cc"], |
| 28 | hdrs = ["pointer_nullability_matchers.h"], |
Googler | dc371e2 | 2023-12-13 00:29:09 -0800 | [diff] [blame] | 29 | visibility = ["//nullability/test:__pkg__"], |
Wei Yi Tee | 543af74 | 2022-06-01 06:52:24 -0700 | [diff] [blame] | 30 | deps = [ |
Martin Brænne | 7a8d25c | 2023-08-23 03:52:30 -0700 | [diff] [blame] | 31 | ":type_nullability", |
Wei Yi Tee | 1cd62af | 2022-06-09 00:56:46 -0700 | [diff] [blame] | 32 | "@llvm-project//clang:ast", |
Wei Yi Tee | 543af74 | 2022-06-01 06:52:24 -0700 | [diff] [blame] | 33 | "@llvm-project//clang:ast_matchers", |
Wei Yi Tee | 543af74 | 2022-06-01 06:52:24 -0700 | [diff] [blame] | 34 | ], |
| 35 | ) |
| 36 | |
Googler | bcfef62 | 2023-10-17 12:13:54 -0700 | [diff] [blame] | 37 | cc_test( |
| 38 | name = "pointer_nullability_matchers_test", |
| 39 | srcs = ["pointer_nullability_matchers_test.cc"], |
| 40 | deps = [ |
| 41 | ":pointer_nullability_matchers", |
Martin Brænne | 297c5cc | 2023-12-12 00:30:51 -0800 | [diff] [blame] | 42 | ":type_nullability", |
Googler | bcfef62 | 2023-10-17 12:13:54 -0700 | [diff] [blame] | 43 | "@llvm-project//clang:ast_matchers", |
| 44 | "@llvm-project//clang:testing", |
| 45 | "@llvm-project//llvm:Support", |
| 46 | "@llvm-project//third-party/unittest:gtest", |
| 47 | "@llvm-project//third-party/unittest:gtest_main", |
| 48 | ], |
| 49 | ) |
| 50 | |
Wei Yi Tee | 543af74 | 2022-06-01 06:52:24 -0700 | [diff] [blame] | 51 | cc_library( |
| 52 | name = "pointer_nullability_analysis", |
| 53 | srcs = ["pointer_nullability_analysis.cc"], |
| 54 | hdrs = ["pointer_nullability_analysis.h"], |
Googler | 60745f5 | 2023-06-26 11:31:39 -0700 | [diff] [blame] | 55 | visibility = [ |
| 56 | "//nullability/inference:__pkg__", |
| 57 | "//nullability/test:__pkg__", |
| 58 | ], |
Wei Yi Tee | 543af74 | 2022-06-01 06:52:24 -0700 | [diff] [blame] | 59 | deps = [ |
Wei Yi Tee | 8b58e19 | 2022-08-02 10:15:40 -0700 | [diff] [blame] | 60 | ":pointer_nullability", |
Dani Ferreira Franco Moura | 3d56a22 | 2022-11-29 03:12:55 -0800 | [diff] [blame] | 61 | ":pointer_nullability_lattice", |
Wei Yi Tee | 543af74 | 2022-06-01 06:52:24 -0700 | [diff] [blame] | 62 | ":pointer_nullability_matchers", |
Sam McCall | 5fc2a80 | 2023-05-02 05:41:27 -0700 | [diff] [blame] | 63 | ":type_nullability", |
Googler | f7154ea | 2023-12-11 09:30:25 -0800 | [diff] [blame] | 64 | "@absl//absl/base:nullability", |
Lukasz Anforowicz | 2c34cae | 2022-08-26 07:19:20 -0700 | [diff] [blame] | 65 | "@absl//absl/log:check", |
Wei Yi Tee | 543af74 | 2022-06-01 06:52:24 -0700 | [diff] [blame] | 66 | "@llvm-project//clang:analysis", |
| 67 | "@llvm-project//clang:ast", |
| 68 | "@llvm-project//clang:ast_matchers", |
| 69 | "@llvm-project//clang:basic", |
Sam McCall | 1d9a0ce | 2023-07-28 02:55:29 -0700 | [diff] [blame] | 70 | "@llvm-project//llvm:Support", |
Wei Yi Tee | 543af74 | 2022-06-01 06:52:24 -0700 | [diff] [blame] | 71 | ], |
| 72 | ) |
| 73 | |
Sam McCall | 74bf864 | 2023-06-16 11:21:42 -0700 | [diff] [blame] | 74 | cc_test( |
| 75 | name = "pointer_nullability_analysis_test", |
| 76 | srcs = ["pointer_nullability_analysis_test.cc"], |
| 77 | deps = [ |
| 78 | ":pointer_nullability", |
| 79 | ":pointer_nullability_analysis", |
Googler | f7154ea | 2023-12-11 09:30:25 -0800 | [diff] [blame] | 80 | "@absl//absl/base:nullability", |
Sam McCall | 74bf864 | 2023-06-16 11:21:42 -0700 | [diff] [blame] | 81 | "@llvm-project//clang:analysis", |
| 82 | "@llvm-project//clang:ast", |
| 83 | "@llvm-project//clang:basic", |
| 84 | "@llvm-project//clang:testing", |
| 85 | "@llvm-project//llvm:Support", |
Sam McCall | 74bf864 | 2023-06-16 11:21:42 -0700 | [diff] [blame] | 86 | "@llvm-project//third-party/unittest:gtest", |
| 87 | "@llvm-project//third-party/unittest:gtest_main", |
| 88 | ], |
| 89 | ) |
| 90 | |
Wei Yi Tee | 8b58e19 | 2022-08-02 10:15:40 -0700 | [diff] [blame] | 91 | cc_library( |
| 92 | name = "pointer_nullability_diagnosis", |
| 93 | srcs = ["pointer_nullability_diagnosis.cc"], |
| 94 | hdrs = ["pointer_nullability_diagnosis.h"], |
Googler | 7f19b2b | 2023-05-01 09:44:57 -0700 | [diff] [blame] | 95 | visibility = ["//nullability/test:__pkg__"], |
Wei Yi Tee | 8b58e19 | 2022-08-02 10:15:40 -0700 | [diff] [blame] | 96 | deps = [ |
| 97 | ":pointer_nullability", |
Dani Ferreira Franco Moura | 4a73ca7 | 2022-12-14 10:23:56 -0800 | [diff] [blame] | 98 | ":pointer_nullability_lattice", |
Wei Yi Tee | 8b58e19 | 2022-08-02 10:15:40 -0700 | [diff] [blame] | 99 | ":pointer_nullability_matchers", |
Sam McCall | 5fc2a80 | 2023-05-02 05:41:27 -0700 | [diff] [blame] | 100 | ":type_nullability", |
Googler | f7154ea | 2023-12-11 09:30:25 -0800 | [diff] [blame] | 101 | "@absl//absl/base:nullability", |
Googler | 3d9adbe | 2023-07-20 12:41:23 -0700 | [diff] [blame] | 102 | "@absl//absl/log:check", |
Wei Yi Tee | 8b58e19 | 2022-08-02 10:15:40 -0700 | [diff] [blame] | 103 | "@llvm-project//clang:analysis", |
| 104 | "@llvm-project//clang:ast", |
| 105 | "@llvm-project//clang:ast_matchers", |
Wei Yi Tee | 036efdf | 2022-08-19 14:16:26 -0700 | [diff] [blame] | 106 | "@llvm-project//clang:basic", |
Googler | 3d9adbe | 2023-07-20 12:41:23 -0700 | [diff] [blame] | 107 | "@llvm-project//llvm:Support", |
Wei Yi Tee | 8b58e19 | 2022-08-02 10:15:40 -0700 | [diff] [blame] | 108 | ], |
| 109 | ) |
| 110 | |
| 111 | cc_library( |
| 112 | name = "pointer_nullability", |
Sam McCall | 5fc2a80 | 2023-05-02 05:41:27 -0700 | [diff] [blame] | 113 | srcs = ["pointer_nullability.cc"], |
Wei Yi Tee | 8b58e19 | 2022-08-02 10:15:40 -0700 | [diff] [blame] | 114 | hdrs = ["pointer_nullability.h"], |
Googler | 60745f5 | 2023-06-26 11:31:39 -0700 | [diff] [blame] | 115 | visibility = [ |
| 116 | "//nullability/inference:__pkg__", |
| 117 | "//nullability/test:__pkg__", |
| 118 | ], |
Wei Yi Tee | 8b58e19 | 2022-08-02 10:15:40 -0700 | [diff] [blame] | 119 | deps = [ |
Sam McCall | a868026 | 2023-09-21 05:55:27 -0700 | [diff] [blame] | 120 | ":type_nullability", |
Martin Brænne | 3e1cd48 | 2023-10-26 06:51:31 -0700 | [diff] [blame] | 121 | "@absl//absl/base:nullability", |
Wei Yi Tee | 8b58e19 | 2022-08-02 10:15:40 -0700 | [diff] [blame] | 122 | "@llvm-project//clang:analysis", |
| 123 | "@llvm-project//clang:ast", |
Wei Yi Tee | 9c16161 | 2022-08-19 14:20:02 -0700 | [diff] [blame] | 124 | "@llvm-project//clang:basic", |
Wei Yi Tee | 8b58e19 | 2022-08-02 10:15:40 -0700 | [diff] [blame] | 125 | "@llvm-project//llvm:Support", |
| 126 | ], |
| 127 | ) |
Sam McCall | edd7d33 | 2023-04-17 04:47:58 -0700 | [diff] [blame] | 128 | |
| 129 | cc_test( |
| 130 | name = "pointer_nullability_test", |
| 131 | srcs = ["pointer_nullability_test.cc"], |
| 132 | deps = [ |
| 133 | ":pointer_nullability", |
Sam McCall | a868026 | 2023-09-21 05:55:27 -0700 | [diff] [blame] | 134 | ":type_nullability", |
Sam McCall | e37df98 | 2023-05-02 05:46:44 -0700 | [diff] [blame] | 135 | "@llvm-project//clang:analysis", |
Dmitri Gribenko | 61645e1 | 2023-07-17 04:46:21 -0700 | [diff] [blame] | 136 | "@llvm-project//clang:ast", |
Googler | e1504a6 | 2023-07-18 14:03:23 -0700 | [diff] [blame] | 137 | "@llvm-project//clang:basic", |
Martin Brænne | 3e1cd48 | 2023-10-26 06:51:31 -0700 | [diff] [blame] | 138 | "@llvm-project//third-party/unittest:gmock", |
Sam McCall | edd7d33 | 2023-04-17 04:47:58 -0700 | [diff] [blame] | 139 | "@llvm-project//third-party/unittest:gtest", |
| 140 | "@llvm-project//third-party/unittest:gtest_main", |
| 141 | ], |
| 142 | ) |
Sam McCall | 5fc2a80 | 2023-05-02 05:41:27 -0700 | [diff] [blame] | 143 | |
| 144 | cc_library( |
| 145 | name = "type_nullability", |
| 146 | srcs = ["type_nullability.cc"], |
| 147 | hdrs = ["type_nullability.h"], |
Googler | 60745f5 | 2023-06-26 11:31:39 -0700 | [diff] [blame] | 148 | visibility = [ |
| 149 | "//nullability/inference:__pkg__", |
| 150 | "//nullability/test:__pkg__", |
| 151 | ], |
Sam McCall | 5fc2a80 | 2023-05-02 05:41:27 -0700 | [diff] [blame] | 152 | deps = [ |
Googler | f7154ea | 2023-12-11 09:30:25 -0800 | [diff] [blame] | 153 | "@absl//absl/base:nullability", |
Sam McCall | 5fc2a80 | 2023-05-02 05:41:27 -0700 | [diff] [blame] | 154 | "@absl//absl/log:check", |
Sam McCall | e644e1d | 2023-07-18 19:19:12 -0700 | [diff] [blame] | 155 | "@llvm-project//clang:analysis", |
Sam McCall | 5fc2a80 | 2023-05-02 05:41:27 -0700 | [diff] [blame] | 156 | "@llvm-project//clang:ast", |
| 157 | "@llvm-project//clang:basic", |
| 158 | "@llvm-project//llvm:Support", |
| 159 | ], |
| 160 | ) |
| 161 | |
| 162 | cc_test( |
| 163 | name = "type_nullability_test", |
| 164 | srcs = ["type_nullability_test.cc"], |
| 165 | deps = [ |
| 166 | ":type_nullability", |
| 167 | "@absl//absl/log:check", |
Sam McCall | b70563a | 2023-07-28 08:31:23 -0700 | [diff] [blame] | 168 | "@llvm-project//clang:ast", |
Sam McCall | 9a442aa | 2023-05-08 03:06:22 -0700 | [diff] [blame] | 169 | "@llvm-project//clang:basic", |
Sam McCall | 5fc2a80 | 2023-05-02 05:41:27 -0700 | [diff] [blame] | 170 | "@llvm-project//clang:testing", |
| 171 | "@llvm-project//llvm:Support", |
| 172 | "@llvm-project//third-party/unittest:gmock", |
| 173 | "@llvm-project//third-party/unittest:gtest", |
| 174 | "@llvm-project//third-party/unittest:gtest_main", |
| 175 | ], |
| 176 | ) |
Sam McCall | 0cdc04a | 2023-06-27 03:33:00 -0700 | [diff] [blame] | 177 | |
| 178 | cc_library( |
| 179 | name = "proto_matchers", |
| 180 | testonly = 1, |
| 181 | srcs = ["proto_matchers.cc"], |
| 182 | hdrs = ["proto_matchers.h"], |
| 183 | visibility = [":__subpackages__"], |
| 184 | deps = [ |
| 185 | "//third_party/protobuf", |
Googler | f7154ea | 2023-12-11 09:30:25 -0800 | [diff] [blame] | 186 | "@absl//absl/base:nullability", |
Sam McCall | 0cdc04a | 2023-06-27 03:33:00 -0700 | [diff] [blame] | 187 | "@llvm-project//llvm:Support", |
| 188 | "@llvm-project//third-party/unittest:gmock", |
| 189 | ], |
| 190 | ) |
Googler | 523b3fe | 2023-11-06 09:44:25 -0800 | [diff] [blame] | 191 | |
| 192 | cc_test( |
| 193 | name = "pointer_nullability_analysis_benchmark", |
| 194 | srcs = ["pointer_nullability_analysis_benchmark.cc"], |
| 195 | tags = ["benchmark"], |
| 196 | deps = [ |
| 197 | ":pointer_nullability_analysis", |
| 198 | ":pointer_nullability_diagnosis", |
Martin Brænne | 7ca48d7 | 2023-11-27 05:19:59 -0800 | [diff] [blame] | 199 | "//third_party/benchmark", |
Googler | f7154ea | 2023-12-11 09:30:25 -0800 | [diff] [blame] | 200 | "@absl//absl/base:nullability", |
Googler | 523b3fe | 2023-11-06 09:44:25 -0800 | [diff] [blame] | 201 | "@absl//absl/log:check", |
| 202 | "@absl//absl/strings", |
| 203 | "@absl//absl/strings:string_view", |
Googler | 523b3fe | 2023-11-06 09:44:25 -0800 | [diff] [blame] | 204 | "@llvm-project//clang:analysis", |
| 205 | "@llvm-project//clang:ast", |
| 206 | "@llvm-project//clang:basic", |
| 207 | "@llvm-project//clang:testing", |
| 208 | ], |
| 209 | ) |