[PATCH] D44589: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots.

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 20 17:48:24 PDT 2018


vsapsai marked 3 inline comments as done.
vsapsai added inline comments.


================
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));
----------------
aaron.ballman wrote:
> vsapsai wrote:
> > aaron.ballman wrote:
> > > You can elide a lot of braces here.
> > Just to clarify, is it OK if if-branch is with braces but else-branch without? I.e.
> > 
> > ```
> > if (...) {
> >   line 1
> >   line 2
> > } else
> >   the only line
> > ```
> We're consistently inconsistent here. :-) It's okay to do so, and it's okay to not do it, I only brought it up because of how many braces we could elide. It's your call, though.
I know I like braces too much, more than code style mandates, so I removed them. Hopefully, that reflects code style better. And I tried to clang-format both options - no changes.


https://reviews.llvm.org/D44589





More information about the cfe-commits mailing list