[all-commits] [llvm/llvm-project] 9ae21b: [clangd] fix extract-to-function for overloaded op...
Julian Schmidt via All-commits
all-commits at lists.llvm.org
Thu Nov 14 22:05:43 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9ae21b073ab48b376687ecd7fbae12e08b4ae86e
https://github.com/llvm/llvm-project/commit/9ae21b073ab48b376687ecd7fbae12e08b4ae86e
Author: Julian Schmidt <git.julian.schmidt at gmail.com>
Date: 2024-11-15 (Fri, 15 Nov 2024)
Changed paths:
M clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
M clang-tools-extra/clangd/unittests/tweaks/ExtractFunctionTests.cpp
M clang-tools-extra/docs/ReleaseNotes.rst
Log Message:
-----------
[clangd] fix extract-to-function for overloaded operators (#81640)
When selecting code that contains the use of overloaded operators,
the SelectionTree will attribute the operator to the operator
declaration, not to the `CXXOperatorCallExpr`. To allow
extract-to-function to work with these operators, make unselected
`CXXOperatorCallExpr`s valid root statements, just like `DeclStmt`s.
Partially fixes clangd/clangd#1254
---------
Co-authored-by: Nathan Ridge <zeratul976 at hotmail.com>
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