rsanchezsaez added a comment.
Haha! That makes sense. (I miss GitHub's comment reactions on Phabricator,
consider your comments 👍'ed.)
Repository:
rL LLVM
https://reviews.llvm.org/D26108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
jordan_rose added a comment.
Yep, that's the correct syntax. It's not wonderful, but it's already where the
C standard lets you put `const`, so we're just following established practice.
(Learn something new and awful about C every day!)
Repository:
rL LLVM
https://reviews.llvm.org/D26108
rsanchezsaez added a comment.
Oh, I see. Thanks for the explanation.
The fix-it syntax got me confused:
- (instancetype)initWithValues:(const int32_t [__null_unspecified])values
Repository:
rL LLVM
https://reviews.llvm.org/D26108
___
cfe-comm
jordan_rose added a comment.
No, the *arrays themselves* need to be marked as nullable or non-nullable.
Remember that in C array parameters are passed as pointers.
The compiler should give you a fix-it that shows the correct syntax.
Repository:
rL LLVM
https://reviews.llvm.org/D26108
___
rsanchezsaez added a comment.
I think this makes the warning to trigger on methods such as:
- (instancetype)initWithValues:(const int32_t [])values
- (void)updateWithRange:(NSRange)range floatArray:(CGFloat[])array;
(experienced on the just released //Xcode 8.3//).
Perhaps I'm misunderstand
jordan_rose closed this revision.
jordan_rose added a comment.
Committed as https://reviews.llvm.org/rL286520, with a slight fix-up for MSVC
in https://reviews.llvm.org/rL286525.
Repository:
rL LLVM
https://reviews.llvm.org/D26108
___
cfe-commit
ahatanak added inline comments.
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) {
--
jordan_rose added inline comments.
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) {
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.c
jordan_rose added a comment.
Ah, my apologies, @ahatanak. I was testing against the Swift branch of Clang.
Repository:
rL LLVM
https://reviews.llvm.org/D26108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/m
doug.gregor accepted this revision.
doug.gregor added a comment.
This revision is now accepted and ready to land.
Looks good! I appreciate the refactoring of recordNullabilitySeen
Repository:
rL LLVM
https://reviews.llvm.org/D26108
___
cfe-commit
jordan_rose added a comment.
It works fine for me, though note the "depends on
https://reviews.llvm.org/D25850";. The other patches in the series do seem to
have been thrown off by https://reviews.llvm.org/D26226 landing first, though,
so I'll update those.
Repository:
rL LLVM
https://revi
ahatanak added a comment.
Hi Jordan,
It seems that this patch doesn't apply cleanly. Can you rebase it?
Repository:
rL LLVM
https://reviews.llvm.org/D26108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mai
jordan_rose created this revision.
jordan_rose added a reviewer: doug.gregor.
jordan_rose added a subscriber: cfe-commits.
jordan_rose set the repository for this revision to rL LLVM.
jordan_rose added a dependency: D25850: Accept nullability annotations
(_Nullable) on array parameters.
This is a
14 matches
Mail list logo