Page MenuHomePhabricator

Add QualType::getNullability for _Optional
Needs ReviewPublic

Authored by chrisbazley on Jan 27 2023, 8:48 AM.
This revision needs review, but there are no reviewers specified.



The purpose of this change is to ensure that a
qualified declaration such as '_Optional int *' is
treated as equivalent to the annotated declaration
'int *_Nullable' in all situations where type
qualifiers are available.

The new method falls back to Type::getNullability() if
called for a QualType which is not a pointer to an
_Optional-qualified type.

Updated all of the callers which previously invoked
Type::getNullability() via QualType::operator->() so
that they call the new method directly on the QualType

Diff Detail