aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra
diff options
context:
space:
mode:
authorHaojian Wu <hokein@google.com>2018-12-21 09:32:49 +0000
committerHaojian Wu <hokein@google.com>2018-12-21 09:32:49 +0000
commit744eb3c3be8be0dae4458e9786296ba6d7dffda6 (patch)
treed72a8aa88a12d4817a0459a423f316d44271fb4a /clang-tools-extra
parent5d403f6bf8818415fd0425a89ece8a69fb6da155 (diff)
[clangd] Cleanup syntax errors in the test, NFC.
llvm-svn: 349893
Diffstat (limited to 'clang-tools-extra')
-rw-r--r--clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp8
-rw-r--r--clang-tools-extra/unittests/clangd/FindSymbolsTests.cpp2
-rw-r--r--clang-tools-extra/unittests/clangd/QualityTests.cpp2
-rw-r--r--clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp2
4 files changed, 7 insertions, 7 deletions
diff --git a/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp b/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp
index d29e8b5ae56f..49b108a60197 100644
--- a/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp
+++ b/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp
@@ -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 = {};
diff --git a/clang-tools-extra/unittests/clangd/FindSymbolsTests.cpp b/clang-tools-extra/unittests/clangd/FindSymbolsTests.cpp
index 8c9fc2698cca..511c46e3e4d8 100644
--- a/clang-tools-extra/unittests/clangd/FindSymbolsTests.cpp
+++ b/clang-tools-extra/unittests/clangd/FindSymbolsTests.cpp
@@ -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"
diff --git a/clang-tools-extra/unittests/clangd/QualityTests.cpp b/clang-tools-extra/unittests/clangd/QualityTests.cpp
index f1a1fdae6b4e..898150f62c47 100644
--- a/clang-tools-extra/unittests/clangd/QualityTests.cpp
+++ b/clang-tools-extra/unittests/clangd/QualityTests.cpp
@@ -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();
diff --git a/clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp b/clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp
index 952fcbef1e93..1829c9ad8412 100644
--- a/clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp
+++ b/clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp
@@ -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 {}; }
}
)",