[PATCH] D69543: [clangd] Add a tweak refactoring to wrap Objective-C string literals in `NSLocalizedString` macros

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 2 16:52:50 PST 2019


arphaman added inline comments.


================
Comment at: clang-tools-extra/clangd/ParsedAST.h:80
 
+  const LangOptions &getLangOpts() const {
+    return getASTContext().getLangOpts();
----------------
kadircet wrote:
> can we introduce this helper in a new patch, while changing other occurrences in clangd?
Sounds good, I'll do that.


================
Comment at: clang-tools-extra/clangd/refactor/tweaks/ObjCLocalizeStringLiteral.cpp:34
+/// After:
+///   NSLocalizedString(@"description", "")
+class ObjCLocalizeStringLiteral : public Tweak {
----------------
kadircet wrote:
>  NSLocalizedString(@"description", `@`"")
Great catch, thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69543





More information about the cfe-commits mailing list