[PATCH] D88726: [clangd] Make PopulateSwitch a fix.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 2 03:18:42 PDT 2020


sammccall created this revision.
sammccall added a reviewer: kadircet.
Herald added subscribers: cfe-commits, usaxena95, arphaman.
Herald added a project: clang.
sammccall requested review of this revision.
Herald added subscribers: MaskRay, ilya-biryukov.

It fixes the -Wswitch warning, though we mark it as a fix even if that is off.
This makes it the "recommended" action on an incomplete switch, which seems OK.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88726

Files:
  clang-tools-extra/clangd/refactor/tweaks/PopulateSwitch.cpp


Index: clang-tools-extra/clangd/refactor/tweaks/PopulateSwitch.cpp
===================================================================
--- clang-tools-extra/clangd/refactor/tweaks/PopulateSwitch.cpp
+++ clang-tools-extra/clangd/refactor/tweaks/PopulateSwitch.cpp
@@ -53,7 +53,7 @@
   Expected<Effect> apply(const Selection &Sel) override;
   std::string title() const override { return "Populate switch"; }
   llvm::StringLiteral kind() const override {
-    return CodeAction::REFACTOR_KIND;
+    return CodeAction::QUICKFIX_KIND;
   }
 
 private:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88726.295778.patch
Type: text/x-patch
Size: 549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201002/87e8ee6c/attachment.bin>


More information about the cfe-commits mailing list