Deprecation replacement can be any text but if it looks like a name of
ObjC method and has the same number of arguments as original method,
replace all slot names so after applying a fix-it you have valid code.
rdar://problem/36660853
Paths
| Differential D44589
[Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots. ClosedPublic Authored by vsapsai on Mar 16 2018, 3:08 PM.
Details
Summary Deprecation replacement can be any text but if it looks like a name of rdar://problem/36660853
Diff Detail
Event Timelineaaron.ballman added inline comments.
Comment Actions Address review comments:
Comment Actions This generally looks reasonable to me, but @rsmith should weigh in before you commit because MultiSourceLocation is novel. Comment Actions
Thanks for the review, Aaron. I tried not to do anything stupid with MultiSourceLocation but another opinion will be definitely useful. Comment Actions Hi Volodymyr, thanks for working on this! Overall this looks good, I just have a few nits.
Comment Actions Address review comments:
I have rebased my patch, so diff between changes can be noisy. vsapsai added inline comments.
Comment Actions LGTM, this is a really nice feature!
This revision is now accepted and ready to land.Mar 26 2018, 6:08 PM Comment Actions
Closed by commit rL328807: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots. (authored by vsapsai). · Explain WhyMar 29 2018, 10:39 AM Closed by commit rC328807: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots. (authored by vsapsai). · Explain Why This revision was automatically updated to reflect the committed changes. This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 139981 clang/include/clang/Basic/CharInfo.h
clang/include/clang/Sema/DelayedDiagnostic.h
clang/include/clang/Sema/Sema.h
clang/lib/Sema/DelayedDiagnostic.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaExprObjC.cpp
clang/test/SemaObjC/attr-deprecated-replacement-fixit.m
clang/unittests/Basic/CharInfoTest.cpp
|
You can use makeArrayRef() here instead of the explicit template argument constructor.