[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)
kadir çetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 21 01:49:48 PST 2023
================
@@ -349,6 +349,44 @@ TEST_F(DefineOutlineTest, ApplyTest) {
}
}
+TEST_F(DefineOutlineTest, InCppFile) {
+ FileName = "Test.cpp";
+
+ struct {
+ llvm::StringRef Test;
+ llvm::StringRef ExpectedSource;
+ } Cases[] = {
+ // Member function with some adornments
+ // FIXME: What's with the extra spaces?
+ {
+ "namespace {\n"
----------------
kadircet wrote:
no need for all the complicated test cases, let's just validate the insertion location here for a test case like:
foo.cc
```
namespace foo {
namespace {
struct Foo { void ba^r() {} };
}
}
```
https://github.com/llvm/llvm-project/pull/69704
More information about the cfe-commits
mailing list