[PATCH] D26108: Add -Wnullability-completeness-on-arrays.

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 9 17:01:22 PST 2016


ahatanak added a comment.

In https://reviews.llvm.org/D26108#591270, @jordan_rose wrote:

> Ah, my apologies, @ahatanak. I was testing against the Swift branch of Clang.


That's OK. I haven't tested it yet, but the patch itself looks fine to me.



================
Comment at: lib/Sema/SemaType.cpp:3988
       // Allow arrays of auto if we are a generic lambda parameter.
       // i.e. [](auto (&array)[5]) { return array[0]; }; OK
       if (AT && D.getContext() != Declarator::LambdaExprParameterContext) {
----------------
This isn't something that is related to the changes made in this patch, but it looks like we issue a -Wnullability-completeness warning when there is a generic lambda like this:

```
auto G2 = [](auto a){};
```

Is this expected?


Repository:
  rL LLVM

https://reviews.llvm.org/D26108





More information about the cfe-commits mailing list