[clang-tools-extra] r349893 - [clangd] Cleanup syntax errors in the test, NFC.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 21 01:32:49 PST 2018
Author: hokein
Date: Fri Dec 21 01:32:49 2018
New Revision: 349893
URL: http://llvm.org/viewvc/llvm-project?rev=349893&view=rev
Log:
[clangd] Cleanup syntax errors in the test, NFC.
Modified:
clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp
clang-tools-extra/trunk/unittests/clangd/FindSymbolsTests.cpp
clang-tools-extra/trunk/unittests/clangd/QualityTests.cpp
clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.cpp
Modified: clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp?rev=349893&r1=349892&r2=349893&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp Fri Dec 21 01:32:49 2018
@@ -195,7 +195,7 @@ struct ClassWithMembers {
int AAA();
int BBB();
int CCC();
-}
+};
int main() { ClassWithMembers().^ }
)cpp",
/*IndexSymbols=*/{}, Opts);
@@ -628,7 +628,7 @@ TEST(CompletionTest, NoIncludeInsertionW
R"cpp(
namespace ns {
class X;
- class Y {}
+ class Y {};
}
int main() { ns::^ }
)cpp",
@@ -651,7 +651,7 @@ TEST(CompletionTest, IndexSuppressesPrea
#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, EnableSpeculativeIn
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 = {};
Modified: clang-tools-extra/trunk/unittests/clangd/FindSymbolsTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/FindSymbolsTests.cpp?rev=349893&r1=349892&r2=349893&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/FindSymbolsTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/FindSymbolsTests.cpp Fri Dec 21 01:32:49 2018
@@ -439,7 +439,7 @@ TEST_F(DocumentSymbolsTest, DeclarationD
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"
Modified: clang-tools-extra/trunk/unittests/clangd/QualityTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/QualityTests.cpp?rev=349893&r1=349892&r2=349893&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/QualityTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/QualityTests.cpp Fri Dec 21 01:32:49 2018
@@ -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();
Modified: clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.cpp?rev=349893&r1=349892&r2=349893&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.cpp Fri Dec 21 01:32:49 2018
@@ -131,7 +131,7 @@ TEST_F(ShouldCollectSymbolTest, ShouldCo
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 {}; }
}
)",
More information about the cfe-commits
mailing list