diff options
author | Erik Pilkington <erik.pilkington@gmail.com> | 2020-12-07 09:14:25 -0500 |
---|---|---|
committer | Erik Pilkington <erik.pilkington@gmail.com> | 2020-12-07 17:19:20 -0500 |
commit | 9cd2413f1ca7a7f40132ea3c44f251851aa325c2 (patch) | |
tree | b023d4cd828e280796aaf70da8d6da8e83d30fa9 /clang/include/clang-c | |
parent | 234d88ab5053f0c55e0269d80bcb5e03ed2c0555 (diff) | |
download | llvm-9cd2413f1ca7a7f40132ea3c44f251851aa325c2.zip llvm-9cd2413f1ca7a7f40132ea3c44f251851aa325c2.tar.gz llvm-9cd2413f1ca7a7f40132ea3c44f251851aa325c2.tar.bz2 |
[clang] Add a new nullability annotation for swift async: _Nullable_result
_Nullable_result generally like _Nullable, except when being imported into a
swift async method. rdar://70106409
Differential revision: https://reviews.llvm.org/D92495
Diffstat (limited to 'clang/include/clang-c')
-rw-r--r-- | clang/include/clang-c/Index.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index 1c91e05..e305283 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -3861,7 +3861,15 @@ enum CXTypeNullabilityKind { /** * Nullability is not applicable to this type. */ - CXTypeNullability_Invalid = 3 + CXTypeNullability_Invalid = 3, + + /** + * Generally behaves like Nullable, except when used in a block parameter that + * was imported into a swift async method. There, swift will assume that the + * parameter can get null even if no error occured. _Nullable parameters are + * assumed to only get null on error. + */ + CXTypeNullability_NullableResult = 4 }; /** |