[PATCH] D81263: [Sema][CodeComplete][ObjC] Don't include arrow/dot fixits

David Goldman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 8 06:31:03 PDT 2020


dgoldman added inline comments.


================
Comment at: clang/lib/Sema/SemaCodeComplete.cpp:5153
 
-  auto DoCompletion = [&](Expr *Base, bool IsArrow,
+  auto DoCompletion = [&](Expr *Base, bool IsArrow, bool IncludeObjC,
                           Optional<FixItHint> AccessOpFixIt) -> bool {
----------------
sammccall wrote:
> IncludeObjC is always `!AccessOpFixIt.hasValue()` - use that directly with a suitable comment?
Ah good call, done


================
Comment at: clang/lib/Sema/SemaCodeComplete.cpp:5251
+
+  // Fixits are only included for C++. We avoid this for Objective-C properties
+  // and ivars since most properties are backed by an ivar; otherwise we would
----------------
sammccall wrote:
> This first sentence isn't accurate - they're included for C, and even in obj-c, just not for obj-c objects.
> I'd suggest dropping it and also the note about alternative solutions, unless there's a reason we're likely to want to do that instead in the future.
Removed this in favor of a comment in the checks above. Think they're useful (albeit duplicated) since they give some explanation as to why.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81263/new/

https://reviews.llvm.org/D81263





More information about the cfe-commits mailing list