[PATCH] D142733: Add _Optional as fast qualifier

2023-01-29 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley added a comment. Hi, thanks very much for looking at my patch. I added the link that you proposed to all of the patches in the stack. > Assuming that we want to go in this direction, it seems quite expensive to > model this as a fast qualifier rather than an extended qualifier. Tru

[PATCH] D142738: Warn if _Optional used at top-level of decl

2023-01-29 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley added a comment. Please refer to https://discourse.llvm.org/t/rfc-optional-a-type-qualifier-to-indicate-pointer-nullability/ and https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3089.pdf for the wider context of this commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D142737: Updated getNullabilityAnnotation for checkers

2023-01-29 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley added a comment. Please refer to https://discourse.llvm.org/t/rfc-optional-a-type-qualifier-to-indicate-pointer-nullability/ and https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3089.pdf for the wider context of this commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D142736: Add QualType::getNullability for _Optional

2023-01-29 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley added a comment. Please refer to https://discourse.llvm.org/t/rfc-optional-a-type-qualifier-to-indicate-pointer-nullability/ and https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3089.pdf for the wider context of this commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D142734: Updated CheckAddressOfOperand

2023-01-29 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley added a comment. Please refer to https://discourse.llvm.org/t/rfc-optional-a-type-qualifier-to-indicate-pointer-nullability/ and https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3089.pdf for the wider context of this commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D142733: Add _Optional as fast qualifier

2023-01-29 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley added a comment. Please refer to https://discourse.llvm.org/t/rfc-optional-a-type-qualifier-to-indicate-pointer-nullability/ and https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3089.pdf for the wider context of this commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D142744: Re-analyze functions as top-level

2023-01-29 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley added a comment. Please refer to https://discourse.llvm.org/t/rfc-optional-a-type-qualifier-to-indicate-pointer-nullability/ and https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3089.pdf for the wider context of this commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D142743: Fix nullability checking of top-level functions

2023-01-29 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley added a comment. Please refer to https://discourse.llvm.org/t/rfc-optional-a-type-qualifier-to-indicate-pointer-nullability/ and https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3089.pdf for the wider context of this commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D142742: Generate ImplicitNullDerefEvent from CallAndMessageChecker

2023-01-29 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley added a comment. Please refer to https://discourse.llvm.org/t/rfc-optional-a-type-qualifier-to-indicate-pointer-nullability/ and https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3089.pdf for the wider context of this commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D142741: Fix ProgramState::isNull for non-region symbols

2023-01-29 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley added a comment. Please refer to https://discourse.llvm.org/t/rfc-optional-a-type-qualifier-to-indicate-pointer-nullability/ and https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3089.pdf for the wider context of this commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D142739: Standalone checker for use of _Optional qualifier

2023-01-29 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley added a comment. Please refer to https://discourse.llvm.org/t/rfc-optional-a-type-qualifier-to-indicate-pointer-nullability/ and https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3089.pdf for the wider context of this commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D142744: Re-analyze functions as top-level

2023-01-27 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley added a comment. This change is admittedly a hack. It might be better to check the function parameter types, or maybe the list of exceptions in this function is now so long that it no longer serves any purpose. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D142744: Re-analyze functions as top-level

2023-01-27 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley created this revision. Herald added subscribers: steakhal, martong. Herald added a reviewer: NoQ. Herald added a project: All. chrisbazley requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. If a function with a _Nullable parameter

[PATCH] D142743: Fix nullability checking of top-level functions

2023-01-27 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley created this revision. Herald added subscribers: steakhal, martong. Herald added a reviewer: NoQ. Herald added a project: All. chrisbazley requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The existing nullability checker is so li

[PATCH] D142742: Generate ImplicitNullDerefEvent from CallAndMessageChecker

2023-01-27 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley created this revision. Herald added subscribers: steakhal, martong. Herald added a reviewer: NoQ. Herald added a project: All. chrisbazley requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Without this change, the following code d

[PATCH] D142741: Fix ProgramState::isNull for non-region symbols

2023-01-27 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley created this revision. Herald added subscribers: steakhal, martong. Herald added a reviewer: NoQ. Herald added a project: All. chrisbazley requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This method was good at telling that a po

[PATCH] D142739: Standalone checker for use of _Optional qualifier

2023-01-27 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley created this revision. Herald added subscribers: steakhal, martong. Herald added a reviewer: NoQ. Herald added a project: All. chrisbazley requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This checker tries to f

[PATCH] D142738: Warn if _Optional used at top-level of decl

2023-01-27 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley created this revision. Herald added a project: All. chrisbazley requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Parameter declarations using [] syntax can be written more naturally using an _Optional qualifier than using Clang's

[PATCH] D142737: Updated getNullabilityAnnotation for checkers

2023-01-27 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley created this revision. Herald added subscribers: steakhal, martong, JDevlieghere. Herald added a reviewer: NoQ. Herald added a project: All. chrisbazley requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. NullabilityChecker and Trus

[PATCH] D142736: Add QualType::getNullability for _Optional

2023-01-27 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. chrisbazley requested review of this revision. Herald added projects: clang, clang-tools-extra. Herald added a subscriber: cfe-commits. The purpose of this change is to ensure that a quali

[PATCH] D142734: Updated CheckAddressOfOperand

2023-01-27 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley created this revision. Herald added a project: All. chrisbazley requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The semantics of the unary & operator are modified so that if its operand has type "type" then its result has type

[PATCH] D142733: Add _Optional as fast qualifier

2023-01-27 Thread Christopher Bazley via Phabricator via cfe-commits
chrisbazley created this revision. Herald added subscribers: Moerafaat, zero9178, bzcheeseman, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, jdoerfert, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, antiagainst, shauheen, rriddle,