mwyman marked an inline comment as done.
mwyman added inline comments.

================
Comment at: 
clang-tools-extra/clang-tidy/objc/NsinvocationArgumentLifetimeCheck.cpp:71-73
+  // Currently there is no way to directly get the source range for the
+  // __weak/__strong ObjC lifetime qualifiers, so it's necessary to string
+  // search in the source code.
----------------
benhamilton wrote:
> Is there a bug filed for this? Seems like an oversight.
> 
Maybe I'm incorrectly reading this, but per the comment on QualifiedTypeLoc it 
seems like this is intentional at this time: 
https://github.com/llvm/llvm-project/blob/549e87f3d04bbae91bc7bc38609ce7073e2c8a6d/clang/include/clang/AST/TypeLoc.h#L275


================
Comment at: 
clang-tools-extra/clang-tidy/objc/NsinvocationArgumentLifetimeCheck.cpp:116
+  auto Diag = diag(MatchedExpr->getArg(0)->getBeginLoc(),
+                   "NSInvocation's %0 should only pass pointers to "
+                   "objects with ownership __unsafe_unretained")
----------------
benhamilton wrote:
> -[NSInvocation %0] should
> 
Tweaked the format string so it now outputs "NSInvocation '-…'", since the 
diagnostic formatter inserts single-quotes, which would otherwise make it read 
"-[NSInvocation 'getArgument:atIndex:']", which seems weirder.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77571



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to