aaron.ballman added a reviewer: rsmith.
aaron.ballman added inline comments.
================
Comment at: clang/include/clang/Sema/DelayedDiagnostic.h:198-199
+ assert(Kind == Availability && "Not an availability diagnostic.");
+ return MultiSourceLocation(ArrayRef<SourceLocation>(
+ AvailabilityData.SelectorLocs, AvailabilityData.NumSelectorLocs));
+ }
----------------
You can use `makeArrayRef()` here instead of the explicit template argument
constructor.
================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:7196
+ SmallVector<StringRef, 12> SelectorSlotNames;
+ auto NumParams = parseObjCMethodName(Replacement, SelectorSlotNames,
+ S.getLangOpts());
----------------
Do not use `auto` here, as the type is not explicitly spelled out in the
initialization.
================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:7207-7217
+ } else {
+ FixIts.push_back(FixItHint::CreateInsertion(
+ SelectorLocs[I], SelectorSlotNames[I]));
+ }
+ }
+ } else {
+ FixIts.push_back(FixItHint::CreateReplacement(UseRange,
Replacement));
----------------
You can elide a lot of braces here.
https://reviews.llvm.org/D44589
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits