[clang-tools-extra] [clangd] Drop const from a return type (NFC) (PR #146623)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 1 20:18:00 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-tools-extra

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>

We don't need const on a return type.


---
Full diff: https://github.com/llvm/llvm-project/pull/146623.diff


1 Files Affected:

- (modified) clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp (+1-1) 


``````````diff
diff --git a/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp b/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
index d6556bba14725..c9704492bf1cd 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
@@ -341,7 +341,7 @@ const FunctionDecl *findTarget(const FunctionDecl *FD) {
 
 // Returns the beginning location for a FunctionDecl. Returns location of
 // template keyword for templated functions.
-const SourceLocation getBeginLoc(const FunctionDecl *FD) {
+SourceLocation getBeginLoc(const FunctionDecl *FD) {
   // Include template parameter list.
   if (auto *FTD = FD->getDescribedFunctionTemplate())
     return FTD->getBeginLoc();

``````````

</details>


https://github.com/llvm/llvm-project/pull/146623


More information about the cfe-commits mailing list