diff options
author | Jordan Rose <jordan_rose@apple.com> | 2016-12-19 22:35:24 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2016-12-19 22:35:24 +0000 |
commit | 281139c159cc26a6e7aadcab25e607ea43aaae65 (patch) | |
tree | f85ad0e47382f4ce37569215a667bfe1191d1c77 /clang/test/FixIt/nullability.mm | |
parent | 5b1ee2fad97ceec55c6b22154b425954649a95b8 (diff) | |
download | bcm5719-llvm-281139c159cc26a6e7aadcab25e607ea43aaae65.tar.gz bcm5719-llvm-281139c159cc26a6e7aadcab25e607ea43aaae65.zip |
Don't try to emit nullability fix-its within/around macros.
The newly-added notes from r290132 are too noisy even when the fix-it
is valid. For the existing warning from r286521, it's probably the
right decision 95% of the time to put the change outside the macro if
the array is outside the macro and inside otherwise, but I don't want
to overthink it right now.
Caught by the ASan bot!
More rdar://problem/29524992
llvm-svn: 290141
Diffstat (limited to 'clang/test/FixIt/nullability.mm')
-rw-r--r-- | clang/test/FixIt/nullability.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/FixIt/nullability.mm b/clang/test/FixIt/nullability.mm index eb900bb4466..815c8441924 100644 --- a/clang/test/FixIt/nullability.mm +++ b/clang/test/FixIt/nullability.mm @@ -16,6 +16,12 @@ extern void* array2[2]; // expected-warning {{inferring '_Nonnull' for pointer t extern void *nestedArray[2][3]; // expected-warning {{inferring '_Nonnull' for pointer type within array is deprecated}} // CHECK: fix-it:"{{.*}}nullability.mm":{[[@LINE-1]]:14-[[@LINE-1]]:14}:" _Nonnull " +// No fix-its on either the macro definition or instantiation. +// CHECK-NOT: fix-it:"{{.*}}nullability.mm":{[[@LINE+2]] +// CHECK-NOT: fix-it:"{{.*}}nullability.mm":{[[@LINE+2]] +#define PTR(X) X * +extern PTR(void) array[2]; // expected-warning {{inferring '_Nonnull' for pointer type within array is deprecated}} + typedef const void *CFTypeRef; |