================
@@ -1001,11 +994,35 @@ UnwindTagContext(TagDecl *DC, api_notes::APINotesManager 
&APINotes) {
   return std::nullopt;
 }
 
-static void stripAPINotesParameterNullability(QualType &ParamType) {
-  while (true) {
-    if (!AttributedType::stripOuterNullability(ParamType))
-      return;
+static QualType stripAPINotesParameterNullability(QualType ParamType,
+                                                  const ASTContext &Context) {
+  while (AttributedType::stripOuterNullability(ParamType)) {
----------------
StoeckOverflow wrote:

I kept this as a loop because `stripOuterNullability` removes only one 
immediate outer nullability attribute wrapper per call.

For example, Clang accepts spellings where nullability can come from both an 
alias and the use site:

```objc
typedef int * _Nullable NullableIntPtr;
void f(NullableIntPtr _Nullable);
```

The loop removes all consecutive outer nullability wrappers, if present, before 
we recurse into pointee types.

https://github.com/llvm/llvm-project/pull/215266
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to