[all-commits] [llvm/llvm-project] 4072a6: Reland "[clangd] Add tweak to override pure virtu...

Marco Maia via All-commits all-commits at lists.llvm.org
Mon Jul 28 00:31:33 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4072a6b85beed8427d14f13248d2f9cfaede489f
      https://github.com/llvm/llvm-project/commit/4072a6b85beed8427d14f13248d2f9cfaede489f
  Author: Marco Maia <marcogmaia at gmail.com>
  Date:   2025-07-28 (Mon, 28 Jul 2025)

  Changed paths:
    M clang-tools-extra/clangd/refactor/tweaks/CMakeLists.txt
    A clang-tools-extra/clangd/refactor/tweaks/OverridePureVirtuals.cpp
    M clang-tools-extra/clangd/unittests/CMakeLists.txt
    A clang-tools-extra/clangd/unittests/tweaks/OverridePureVirtualsTests.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst

  Log Message:
  -----------
  Reland  "[clangd] Add tweak to override pure virtuals" (#150788)

This relands commit
https://github.com/llvm/llvm-project/commit/7355ea3f6b214d1569da43d02f9a166ff15012e6.

The original commit was reverted in
https://github.com/llvm/llvm-project/commit/bfd73a5161608e6355f7db87dc5f5afee56d7e2f
because it was breaking the buildbot.

The issue has now been resolved by
https://github.com/llvm/llvm-project/commit/38f82534bbe9e1c9f5edd975a72e07beb7048423.

Original PR: https://github.com/llvm/llvm-project/pull/139348
Original commit message:
<blockquote>

closes https://github.com/clangd/clangd/issues/1037 
closes https://github.com/clangd/clangd/issues/2240

Example:

```c++
class Base {
public:
  virtual void publicMethod() = 0;

protected:
  virtual auto privateMethod() const -> int = 0;
};

// Before:
//                        // cursor here
class Derived : public Base{}^ ;

// After:
class Derived : public Base {
public:
  void publicMethod() override {
    // TODO: Implement this pure virtual method.
    static_assert(false, "Method `publicMethod` is not implemented.");
  }

protected:
  auto privateMethod() const -> int override {
    // TODO: Implement this pure virtual method.
    static_assert(false, "Method `privateMethod` is not implemented.");
  }
};
```


https://github.com/user-attachments/assets/79de40d9-1004-4c2e-8f5c-be1fb074c6de

</blockquote>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list