2019-06-26 21:08:36 +08:00
|
|
|
//==- SemanticHighlightingTests.cpp - SemanticHighlighting tests-*- C++ -* -==//
|
|
|
|
//
|
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "Annotations.h"
|
2019-06-27 23:13:03 +08:00
|
|
|
#include "ClangdServer.h"
|
2019-07-04 15:53:12 +08:00
|
|
|
#include "Protocol.h"
|
2019-06-26 21:08:36 +08:00
|
|
|
#include "SemanticHighlighting.h"
|
2019-06-27 23:13:03 +08:00
|
|
|
#include "TestFS.h"
|
2019-06-26 21:08:36 +08:00
|
|
|
#include "TestTU.h"
|
|
|
|
#include "gmock/gmock.h"
|
|
|
|
|
|
|
|
namespace clang {
|
|
|
|
namespace clangd {
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
std::vector<HighlightingToken>
|
|
|
|
makeHighlightingTokens(llvm::ArrayRef<Range> Ranges, HighlightingKind Kind) {
|
|
|
|
std::vector<HighlightingToken> Tokens(Ranges.size());
|
|
|
|
for (int I = 0, End = Ranges.size(); I < End; ++I) {
|
|
|
|
Tokens[I].R = Ranges[I];
|
|
|
|
Tokens[I].Kind = Kind;
|
|
|
|
}
|
|
|
|
|
|
|
|
return Tokens;
|
|
|
|
}
|
|
|
|
|
2019-08-01 16:08:44 +08:00
|
|
|
std::vector<HighlightingToken> getExpectedTokens(Annotations &Test) {
|
2019-06-26 21:08:36 +08:00
|
|
|
static const std::map<HighlightingKind, std::string> KindToString{
|
|
|
|
{HighlightingKind::Variable, "Variable"},
|
2019-07-10 16:41:25 +08:00
|
|
|
{HighlightingKind::Function, "Function"},
|
|
|
|
{HighlightingKind::Class, "Class"},
|
2019-07-11 17:29:16 +08:00
|
|
|
{HighlightingKind::Enum, "Enum"},
|
2019-07-15 15:41:12 +08:00
|
|
|
{HighlightingKind::Namespace, "Namespace"},
|
2019-07-15 16:12:21 +08:00
|
|
|
{HighlightingKind::EnumConstant, "EnumConstant"},
|
|
|
|
{HighlightingKind::Field, "Field"},
|
2019-07-18 17:56:38 +08:00
|
|
|
{HighlightingKind::Method, "Method"},
|
|
|
|
{HighlightingKind::TemplateParameter, "TemplateParameter"}};
|
2019-06-26 21:08:36 +08:00
|
|
|
std::vector<HighlightingToken> ExpectedTokens;
|
|
|
|
for (const auto &KindString : KindToString) {
|
2019-07-10 16:41:25 +08:00
|
|
|
std::vector<HighlightingToken> Toks = makeHighlightingTokens(
|
|
|
|
Test.ranges(KindString.second), KindString.first);
|
2019-06-26 21:08:36 +08:00
|
|
|
ExpectedTokens.insert(ExpectedTokens.end(), Toks.begin(), Toks.end());
|
|
|
|
}
|
2019-08-01 16:08:44 +08:00
|
|
|
llvm::sort(ExpectedTokens);
|
|
|
|
return ExpectedTokens;
|
|
|
|
}
|
|
|
|
|
|
|
|
void checkHighlightings(llvm::StringRef Code) {
|
|
|
|
Annotations Test(Code);
|
|
|
|
auto AST = TestTU::withCode(Test.code()).build();
|
|
|
|
std::vector<HighlightingToken> ActualTokens = getSemanticHighlightings(AST);
|
|
|
|
EXPECT_THAT(ActualTokens, getExpectedTokens(Test));
|
|
|
|
}
|
|
|
|
|
|
|
|
// Any annotations in OldCode and NewCode are converted into their corresponding
|
|
|
|
// HighlightingToken. The tokens are diffed against each other. Any lines where
|
|
|
|
// the tokens should diff must be marked with a ^ somewhere on that line in
|
|
|
|
// NewCode. If there are diffs that aren't marked with ^ the test fails. The
|
|
|
|
// test also fails if there are lines marked with ^ that don't differ.
|
|
|
|
void checkDiffedHighlights(llvm::StringRef OldCode, llvm::StringRef NewCode) {
|
|
|
|
Annotations OldTest(OldCode);
|
|
|
|
Annotations NewTest(NewCode);
|
|
|
|
std::vector<HighlightingToken> OldTokens = getExpectedTokens(OldTest);
|
|
|
|
std::vector<HighlightingToken> NewTokens = getExpectedTokens(NewTest);
|
|
|
|
|
|
|
|
llvm::DenseMap<int, std::vector<HighlightingToken>> ExpectedLines;
|
|
|
|
for (const Position &Point : NewTest.points()) {
|
|
|
|
ExpectedLines[Point.line]; // Default initialize to an empty line. Tokens
|
|
|
|
// are inserted on these lines later.
|
|
|
|
}
|
|
|
|
std::vector<LineHighlightings> ExpectedLinePairHighlighting;
|
|
|
|
for (const HighlightingToken &Token : NewTokens) {
|
|
|
|
auto It = ExpectedLines.find(Token.R.start.line);
|
|
|
|
if (It != ExpectedLines.end())
|
|
|
|
It->second.push_back(Token);
|
|
|
|
}
|
|
|
|
for (auto &LineTokens : ExpectedLines)
|
|
|
|
ExpectedLinePairHighlighting.push_back(
|
|
|
|
{LineTokens.first, LineTokens.second});
|
2019-06-26 21:08:36 +08:00
|
|
|
|
2019-08-01 16:08:44 +08:00
|
|
|
std::vector<LineHighlightings> ActualDiffed =
|
|
|
|
diffHighlightings(NewTokens, OldTokens, NewCode.count('\n'));
|
|
|
|
EXPECT_THAT(ActualDiffed,
|
|
|
|
testing::UnorderedElementsAreArray(ExpectedLinePairHighlighting));
|
2019-06-26 21:08:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
TEST(SemanticHighlighting, GetsCorrectTokens) {
|
|
|
|
const char *TestCases[] = {
|
2019-07-05 21:06:03 +08:00
|
|
|
R"cpp(
|
2019-07-10 16:41:25 +08:00
|
|
|
struct $Class[[AS]] {
|
2019-07-15 16:12:21 +08:00
|
|
|
double $Field[[SomeMember]];
|
2019-07-05 21:06:03 +08:00
|
|
|
};
|
|
|
|
struct {
|
|
|
|
} $Variable[[S]];
|
2019-07-10 16:41:25 +08:00
|
|
|
void $Function[[foo]](int $Variable[[A]], $Class[[AS]] $Variable[[As]]) {
|
2019-07-05 21:06:03 +08:00
|
|
|
auto $Variable[[VeryLongVariableName]] = 12312;
|
2019-07-10 16:41:25 +08:00
|
|
|
$Class[[AS]] $Variable[[AA]];
|
2019-07-15 16:12:21 +08:00
|
|
|
auto $Variable[[L]] = $Variable[[AA]].$Field[[SomeMember]] + $Variable[[A]];
|
2019-07-05 21:06:03 +08:00
|
|
|
auto $Variable[[FN]] = [ $Variable[[AA]]](int $Variable[[A]]) -> void {};
|
|
|
|
$Variable[[FN]](12312);
|
|
|
|
}
|
|
|
|
)cpp",
|
|
|
|
R"cpp(
|
|
|
|
void $Function[[foo]](int);
|
|
|
|
void $Function[[Gah]]();
|
|
|
|
void $Function[[foo]]() {
|
|
|
|
auto $Variable[[Bou]] = $Function[[Gah]];
|
|
|
|
}
|
2019-07-10 16:41:25 +08:00
|
|
|
struct $Class[[A]] {
|
2019-07-15 16:12:21 +08:00
|
|
|
void $Method[[abc]]();
|
2019-07-10 16:41:25 +08:00
|
|
|
};
|
2019-07-05 21:06:03 +08:00
|
|
|
)cpp",
|
|
|
|
R"cpp(
|
2019-07-11 17:29:16 +08:00
|
|
|
namespace $Namespace[[abc]] {
|
2019-07-18 17:56:38 +08:00
|
|
|
template<typename $TemplateParameter[[T]]>
|
2019-07-10 16:41:25 +08:00
|
|
|
struct $Class[[A]] {
|
2019-07-18 17:56:38 +08:00
|
|
|
$TemplateParameter[[T]] $Field[[t]];
|
2019-07-10 16:41:25 +08:00
|
|
|
};
|
|
|
|
}
|
2019-07-18 17:56:38 +08:00
|
|
|
template<typename $TemplateParameter[[T]]>
|
|
|
|
struct $Class[[C]] : $Namespace[[abc]]::$Class[[A]]<$TemplateParameter[[T]]> {
|
|
|
|
typename $TemplateParameter[[T]]::A* $Field[[D]];
|
2019-07-10 16:41:25 +08:00
|
|
|
};
|
2019-07-11 17:29:16 +08:00
|
|
|
$Namespace[[abc]]::$Class[[A]]<int> $Variable[[AA]];
|
2019-07-16 21:23:12 +08:00
|
|
|
typedef $Namespace[[abc]]::$Class[[A]]<int> $Class[[AAA]];
|
2019-07-10 16:41:25 +08:00
|
|
|
struct $Class[[B]] {
|
|
|
|
$Class[[B]]();
|
|
|
|
~$Class[[B]]();
|
|
|
|
void operator<<($Class[[B]]);
|
2019-07-15 16:12:21 +08:00
|
|
|
$Class[[AAA]] $Field[[AA]];
|
2019-07-10 16:41:25 +08:00
|
|
|
};
|
|
|
|
$Class[[B]]::$Class[[B]]() {}
|
|
|
|
$Class[[B]]::~$Class[[B]]() {}
|
|
|
|
void $Function[[f]] () {
|
|
|
|
$Class[[B]] $Variable[[BB]] = $Class[[B]]();
|
|
|
|
$Variable[[BB]].~$Class[[B]]();
|
|
|
|
$Class[[B]]();
|
|
|
|
}
|
|
|
|
)cpp",
|
|
|
|
R"cpp(
|
2019-07-15 15:41:12 +08:00
|
|
|
enum class $Enum[[E]] {
|
|
|
|
$EnumConstant[[A]],
|
|
|
|
$EnumConstant[[B]],
|
|
|
|
};
|
|
|
|
enum $Enum[[EE]] {
|
|
|
|
$EnumConstant[[Hi]],
|
|
|
|
};
|
2019-07-10 16:41:25 +08:00
|
|
|
struct $Class[[A]] {
|
2019-07-15 16:12:21 +08:00
|
|
|
$Enum[[E]] $Field[[EEE]];
|
|
|
|
$Enum[[EE]] $Field[[EEEE]];
|
2019-07-05 21:06:03 +08:00
|
|
|
};
|
2019-07-15 15:41:12 +08:00
|
|
|
int $Variable[[I]] = $EnumConstant[[Hi]];
|
|
|
|
$Enum[[E]] $Variable[[L]] = $Enum[[E]]::$EnumConstant[[B]];
|
2019-07-11 17:29:16 +08:00
|
|
|
)cpp",
|
|
|
|
R"cpp(
|
|
|
|
namespace $Namespace[[abc]] {
|
|
|
|
namespace {}
|
|
|
|
namespace $Namespace[[bcd]] {
|
|
|
|
struct $Class[[A]] {};
|
|
|
|
namespace $Namespace[[cde]] {
|
|
|
|
struct $Class[[A]] {
|
|
|
|
enum class $Enum[[B]] {
|
2019-07-15 15:41:12 +08:00
|
|
|
$EnumConstant[[Hi]],
|
2019-07-11 17:29:16 +08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
using namespace $Namespace[[abc]]::$Namespace[[bcd]];
|
|
|
|
namespace $Namespace[[vwz]] =
|
|
|
|
$Namespace[[abc]]::$Namespace[[bcd]]::$Namespace[[cde]];
|
|
|
|
$Namespace[[abc]]::$Namespace[[bcd]]::$Class[[A]] $Variable[[AA]];
|
|
|
|
$Namespace[[vwz]]::$Class[[A]]::$Enum[[B]] $Variable[[AAA]] =
|
2019-07-15 15:41:12 +08:00
|
|
|
$Namespace[[vwz]]::$Class[[A]]::$Enum[[B]]::$EnumConstant[[Hi]];
|
2019-07-11 17:29:16 +08:00
|
|
|
::$Namespace[[vwz]]::$Class[[A]] $Variable[[B]];
|
|
|
|
::$Namespace[[abc]]::$Namespace[[bcd]]::$Class[[A]] $Variable[[BB]];
|
2019-07-15 16:12:21 +08:00
|
|
|
)cpp",
|
|
|
|
R"cpp(
|
|
|
|
struct $Class[[D]] {
|
|
|
|
double $Field[[C]];
|
|
|
|
};
|
|
|
|
struct $Class[[A]] {
|
|
|
|
double $Field[[B]];
|
|
|
|
$Class[[D]] $Field[[E]];
|
|
|
|
static double $Variable[[S]];
|
|
|
|
void $Method[[foo]]() {
|
|
|
|
$Field[[B]] = 123;
|
|
|
|
this->$Field[[B]] = 156;
|
|
|
|
this->$Method[[foo]]();
|
|
|
|
$Method[[foo]]();
|
|
|
|
$Variable[[S]] = 90.1;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
void $Function[[foo]]() {
|
|
|
|
$Class[[A]] $Variable[[AA]];
|
|
|
|
$Variable[[AA]].$Field[[B]] += 2;
|
|
|
|
$Variable[[AA]].$Method[[foo]]();
|
|
|
|
$Variable[[AA]].$Field[[E]].$Field[[C]];
|
|
|
|
$Class[[A]]::$Variable[[S]] = 90;
|
|
|
|
}
|
2019-07-15 23:08:27 +08:00
|
|
|
)cpp",
|
|
|
|
R"cpp(
|
|
|
|
struct $Class[[AA]] {
|
|
|
|
int $Field[[A]];
|
|
|
|
}
|
|
|
|
int $Variable[[B]];
|
|
|
|
$Class[[AA]] $Variable[[A]]{$Variable[[B]]};
|
2019-07-16 21:23:12 +08:00
|
|
|
)cpp",
|
|
|
|
R"cpp(
|
|
|
|
namespace $Namespace[[a]] {
|
|
|
|
struct $Class[[A]] {};
|
|
|
|
}
|
|
|
|
typedef $Namespace[[a]]::$Class[[A]] $Class[[B]];
|
|
|
|
using $Class[[BB]] = $Namespace[[a]]::$Class[[A]];
|
|
|
|
enum class $Enum[[E]] {};
|
|
|
|
typedef $Enum[[E]] $Enum[[C]];
|
|
|
|
typedef $Enum[[C]] $Enum[[CC]];
|
|
|
|
using $Enum[[CD]] = $Enum[[CC]];
|
|
|
|
$Enum[[CC]] $Function[[f]]($Class[[B]]);
|
|
|
|
$Enum[[CD]] $Function[[f]]($Class[[BB]]);
|
2019-07-18 17:56:38 +08:00
|
|
|
)cpp",
|
|
|
|
R"cpp(
|
|
|
|
template<typename $TemplateParameter[[T]], typename = void>
|
|
|
|
class $Class[[A]] {
|
|
|
|
$TemplateParameter[[T]] $Field[[AA]];
|
|
|
|
$TemplateParameter[[T]] $Method[[foo]]();
|
|
|
|
};
|
|
|
|
template<class $TemplateParameter[[TT]]>
|
|
|
|
class $Class[[B]] {
|
|
|
|
$Class[[A]]<$TemplateParameter[[TT]]> $Field[[AA]];
|
|
|
|
};
|
|
|
|
template<class $TemplateParameter[[TT]], class $TemplateParameter[[GG]]>
|
|
|
|
class $Class[[BB]] {};
|
|
|
|
template<class $TemplateParameter[[T]]>
|
|
|
|
class $Class[[BB]]<$TemplateParameter[[T]], int> {};
|
|
|
|
template<class $TemplateParameter[[T]]>
|
|
|
|
class $Class[[BB]]<$TemplateParameter[[T]], $TemplateParameter[[T]]*> {};
|
|
|
|
|
|
|
|
template<template<class> class $TemplateParameter[[T]], class $TemplateParameter[[C]]>
|
|
|
|
$TemplateParameter[[T]]<$TemplateParameter[[C]]> $Function[[f]]();
|
|
|
|
|
|
|
|
template<typename>
|
|
|
|
class $Class[[Foo]] {};
|
|
|
|
|
|
|
|
template<typename $TemplateParameter[[T]]>
|
|
|
|
void $Function[[foo]]($TemplateParameter[[T]] ...);
|
2019-07-05 21:06:03 +08:00
|
|
|
)cpp"};
|
2019-06-26 21:08:36 +08:00
|
|
|
for (const auto &TestCase : TestCases) {
|
|
|
|
checkHighlightings(TestCase);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-04 15:53:12 +08:00
|
|
|
TEST(SemanticHighlighting, GeneratesHighlightsWhenFileChange) {
|
2019-06-27 23:13:03 +08:00
|
|
|
class HighlightingsCounterDiagConsumer : public DiagnosticsConsumer {
|
|
|
|
public:
|
|
|
|
std::atomic<int> Count = {0};
|
|
|
|
|
|
|
|
void onDiagnosticsReady(PathRef, std::vector<Diag>) override {}
|
2019-08-01 16:08:44 +08:00
|
|
|
void onHighlightingsReady(PathRef File,
|
|
|
|
std::vector<HighlightingToken> Highlightings,
|
|
|
|
int NLines) override {
|
2019-06-27 23:13:03 +08:00
|
|
|
++Count;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
auto FooCpp = testPath("foo.cpp");
|
|
|
|
MockFSProvider FS;
|
|
|
|
FS.Files[FooCpp] = "";
|
|
|
|
|
|
|
|
MockCompilationDatabase MCD;
|
|
|
|
HighlightingsCounterDiagConsumer DiagConsumer;
|
|
|
|
ClangdServer Server(MCD, FS, DiagConsumer, ClangdServer::optsForTest());
|
|
|
|
Server.addDocument(FooCpp, "int a;");
|
|
|
|
ASSERT_TRUE(Server.blockUntilIdleForTest()) << "Waiting for server";
|
|
|
|
ASSERT_EQ(DiagConsumer.Count, 1);
|
|
|
|
}
|
|
|
|
|
2019-07-04 15:53:12 +08:00
|
|
|
TEST(SemanticHighlighting, toSemanticHighlightingInformation) {
|
|
|
|
auto CreatePosition = [](int Line, int Character) -> Position {
|
|
|
|
Position Pos;
|
|
|
|
Pos.line = Line;
|
|
|
|
Pos.character = Character;
|
|
|
|
return Pos;
|
|
|
|
};
|
|
|
|
|
2019-08-01 16:08:44 +08:00
|
|
|
std::vector<LineHighlightings> Tokens{
|
|
|
|
{3,
|
|
|
|
{{HighlightingKind::Variable,
|
|
|
|
Range{CreatePosition(3, 8), CreatePosition(3, 12)}},
|
|
|
|
{HighlightingKind::Function,
|
|
|
|
Range{CreatePosition(3, 4), CreatePosition(3, 7)}}}},
|
|
|
|
{1,
|
|
|
|
{{HighlightingKind::Variable,
|
|
|
|
Range{CreatePosition(1, 1), CreatePosition(1, 5)}}}}};
|
2019-07-04 15:53:12 +08:00
|
|
|
std::vector<SemanticHighlightingInformation> ActualResults =
|
|
|
|
toSemanticHighlightingInformation(Tokens);
|
|
|
|
std::vector<SemanticHighlightingInformation> ExpectedResults = {
|
2019-08-01 16:08:44 +08:00
|
|
|
{3, "AAAACAAEAAAAAAAEAAMAAQ=="}, {1, "AAAAAQAEAAA="}};
|
2019-07-04 15:53:12 +08:00
|
|
|
EXPECT_EQ(ActualResults, ExpectedResults);
|
|
|
|
}
|
|
|
|
|
2019-08-01 16:08:44 +08:00
|
|
|
TEST(SemanticHighlighting, HighlightingDiffer) {
|
|
|
|
struct {
|
|
|
|
llvm::StringRef OldCode;
|
|
|
|
llvm::StringRef NewCode;
|
|
|
|
} TestCases[]{{
|
|
|
|
R"(
|
|
|
|
$Variable[[A]]
|
|
|
|
$Class[[B]]
|
|
|
|
$Function[[C]]
|
|
|
|
)",
|
|
|
|
R"(
|
|
|
|
$Variable[[A]]
|
|
|
|
$Class[[D]]
|
|
|
|
$Function[[C]]
|
|
|
|
)"},
|
|
|
|
{
|
|
|
|
R"(
|
|
|
|
$Class[[C]]
|
|
|
|
$Field[[F]]
|
|
|
|
$Variable[[V]]
|
|
|
|
$Class[[C]] $Variable[[V]] $Field[[F]]
|
|
|
|
)",
|
|
|
|
R"(
|
|
|
|
$Class[[C]]
|
|
|
|
$Field[[F]]
|
|
|
|
^$Function[[F]]
|
|
|
|
$Class[[C]] $Variable[[V]] $Field[[F]]
|
|
|
|
)"},
|
|
|
|
{
|
|
|
|
R"(
|
|
|
|
|
|
|
|
$Class[[A]]
|
|
|
|
$Variable[[A]]
|
|
|
|
)",
|
|
|
|
R"(
|
|
|
|
|
|
|
|
^
|
|
|
|
^$Class[[A]]
|
|
|
|
^$Variable[[A]]
|
|
|
|
)"},
|
|
|
|
{
|
|
|
|
R"(
|
|
|
|
$Class[[C]]
|
|
|
|
$Field[[F]]
|
|
|
|
$Variable[[V]]
|
|
|
|
$Class[[C]] $Variable[[V]] $Field[[F]]
|
|
|
|
)",
|
|
|
|
R"(
|
|
|
|
$Class[[C]]
|
|
|
|
^
|
|
|
|
^
|
|
|
|
$Class[[C]] $Variable[[V]] $Field[[F]]
|
|
|
|
)"},
|
|
|
|
{
|
|
|
|
R"(
|
|
|
|
$Class[[A]]
|
|
|
|
$Variable[[A]]
|
|
|
|
$Variable[[A]]
|
|
|
|
)",
|
|
|
|
R"(
|
|
|
|
$Class[[A]]
|
|
|
|
^$Variable[[AA]]
|
|
|
|
$Variable[[A]]
|
|
|
|
)"},
|
|
|
|
{
|
|
|
|
R"(
|
|
|
|
$Class[[A]]
|
|
|
|
$Variable[[A]]
|
|
|
|
$Class[[A]]
|
|
|
|
$Variable[[A]]
|
|
|
|
)",
|
|
|
|
R"(
|
|
|
|
$Class[[A]]
|
|
|
|
$Variable[[A]]
|
|
|
|
)"},
|
|
|
|
{
|
|
|
|
R"(
|
|
|
|
$Class[[A]]
|
|
|
|
$Variable[[A]]
|
|
|
|
)",
|
|
|
|
R"(
|
|
|
|
$Class[[A]]
|
|
|
|
$Variable[[A]]
|
|
|
|
^$Class[[A]]
|
|
|
|
^$Variable[[A]]
|
|
|
|
)"},
|
|
|
|
{
|
|
|
|
R"(
|
|
|
|
$Variable[[A]]
|
|
|
|
$Variable[[A]]
|
|
|
|
$Variable[[A]]
|
|
|
|
)",
|
|
|
|
R"(
|
|
|
|
^$Class[[A]]
|
|
|
|
^$Class[[A]]
|
|
|
|
^$Class[[A]]
|
|
|
|
)"}};
|
|
|
|
|
|
|
|
for (const auto &Test : TestCases)
|
|
|
|
checkDiffedHighlights(Test.OldCode, Test.NewCode);
|
|
|
|
}
|
|
|
|
|
2019-06-26 21:08:36 +08:00
|
|
|
} // namespace
|
|
|
|
} // namespace clangd
|
|
|
|
} // namespace clang
|