[nullability] Use `isSupportedPointer()` more widely.
Also:
- Rename to `isSupportedPointerType()` for consistency with
`QualType::isPointerType()`.
- Make the function desugar. We'll want to desugar in most places we use this,
and leaving the desugaring to the caller means the caller might forget.
We do eventually want a version that doesn't desugar, so that we can decide
whether we can rewrite a type or not, but that version should probably deal
in `TypeLoc` instead of `QualType`.
- Add a corresponding AST matcher (called just `isSupportedPointer()` for
consistency with `ast_matchers::isAnyPointer()`)
Use `isSupportedPointerType()` wherever we had been using `isPointerType()` or
`isAnyPointerType()`. (The latter was in widespread use but also includes
Objective-C pointers, which we don't currently actually support.)
PiperOrigin-RevId: 559377210
Change-Id: I69b44ce2ca78cf8e47a1061255ab797bfb68e374
diff --git a/nullability/BUILD b/nullability/BUILD
index ae4b293..0ee6158 100644
--- a/nullability/BUILD
+++ b/nullability/BUILD
@@ -26,6 +26,7 @@
"//nullability/inference:__pkg__",
],
deps = [
+ ":type_nullability",
"@llvm-project//clang:ast",
"@llvm-project//clang:ast_matchers",
],