[clangd] Cleanup syntax errors in the test, NFC.
llvm-svn: 349893
This commit is contained in:
parent
5d403f6bf8
commit
744eb3c3be
|
@ -195,7 +195,7 @@ struct ClassWithMembers {
|
|||
int AAA();
|
||||
int BBB();
|
||||
int CCC();
|
||||
}
|
||||
};
|
||||
int main() { ClassWithMembers().^ }
|
||||
)cpp",
|
||||
/*IndexSymbols=*/{}, Opts);
|
||||
|
@ -628,7 +628,7 @@ TEST(CompletionTest, NoIncludeInsertionWhenDeclFoundInFile) {
|
|||
R"cpp(
|
||||
namespace ns {
|
||||
class X;
|
||||
class Y {}
|
||||
class Y {};
|
||||
}
|
||||
int main() { ns::^ }
|
||||
)cpp",
|
||||
|
@ -651,7 +651,7 @@ TEST(CompletionTest, IndexSuppressesPreambleCompletions) {
|
|||
#include "bar.h"
|
||||
namespace ns { int local; }
|
||||
void f() { ns::^; }
|
||||
void f() { ns::preamble().$2^; }
|
||||
void f2() { ns::preamble().$2^; }
|
||||
)cpp");
|
||||
runAddDocument(Server, File, Test.code());
|
||||
clangd::CodeCompleteOptions Opts = {};
|
||||
|
@ -1927,7 +1927,7 @@ TEST(CompletionTest, EnableSpeculativeIndexRequest) {
|
|||
namespace ns1 { int abc; }
|
||||
namespace ns2 { int abc; }
|
||||
void f() { ns1::ab$1^; ns1::ab$2^; }
|
||||
void f() { ns2::ab$3^; }
|
||||
void f2() { ns2::ab$3^; }
|
||||
)cpp");
|
||||
runAddDocument(Server, File, Test.code());
|
||||
clangd::CodeCompleteOptions Opts = {};
|
||||
|
|
|
@ -439,7 +439,7 @@ TEST_F(DocumentSymbolsTest, DeclarationDefinition) {
|
|||
TEST_F(DocumentSymbolsTest, ExternSymbol) {
|
||||
std::string FilePath = testPath("foo.cpp");
|
||||
addFile(testPath("foo.h"), R"cpp(
|
||||
extern int var = 2;
|
||||
extern int var;
|
||||
)cpp");
|
||||
addFile(FilePath, R"cpp(
|
||||
#include "foo.h"
|
||||
|
|
|
@ -429,7 +429,7 @@ TEST(QualityTests, Operator) {
|
|||
auto Header = TestTU::withHeaderCode(R"cpp(
|
||||
class Foo {
|
||||
public:
|
||||
bool operator<(const Foo& f1, const Foo& f2);
|
||||
bool operator<(const Foo& f1);
|
||||
};
|
||||
)cpp");
|
||||
auto AST = Header.build();
|
||||
|
|
|
@ -131,7 +131,7 @@ TEST_F(ShouldCollectSymbolTest, ShouldCollectSymbol) {
|
|||
namespace nx {
|
||||
class X{};
|
||||
auto f() { int Local; } // auto ensures function body is parsed.
|
||||
struct { int x } var;
|
||||
struct { int x; } var;
|
||||
namespace { class InAnonymous {}; }
|
||||
}
|
||||
)",
|
||||
|
|
Loading…
Reference in New Issue