[clang-tools-extra] [clangd] Drop const from a return type (NFC) (PR #146707)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 2 07:34:10 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clangd
@llvm/pr-subscribers-clang-tools-extra
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
We don't need const on the return type.
---
Full diff: https://github.com/llvm/llvm-project/pull/146707.diff
1 Files Affected:
- (modified) clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp (+3-3)
``````````diff
diff --git a/clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp b/clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp
index 90dac3b76c648..c74250ccbe9ea 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp
@@ -359,9 +359,9 @@ struct ParsedBinaryOperator {
// + c <- End
// / \
// a b <- Start
-const SourceRange getBinaryOperatorRange(const SelectionTree::Node &N,
- const SourceManager &SM,
- const LangOptions &LangOpts) {
+SourceRange getBinaryOperatorRange(const SelectionTree::Node &N,
+ const SourceManager &SM,
+ const LangOptions &LangOpts) {
// If N is not a suitable binary operator, bail out.
ParsedBinaryOperator Op;
if (!Op.parse(N.ignoreImplicit()) || !Op.associative() ||
``````````
</details>
https://github.com/llvm/llvm-project/pull/146707
More information about the cfe-commits
mailing list