From 0e1997ed4ef74202a1bec6e7c18ba7a1df496896 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Fri, 26 Jun 2020 03:02:28 +0200 Subject: [PATCH] [clangd] Fix test compile with GCC (name conflict) --- clang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp b/clang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp index db94e7b..e3b8215 100644 --- a/clang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp +++ b/clang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp @@ -59,10 +59,10 @@ struct CapturedDiags { Out.Pos.character = D.getColumnNo(); // Zero-based - bug in SourceMgr? if (!D.getRanges().empty()) { const auto &R = D.getRanges().front(); - Out.Range.emplace(); - Out.Range->start.line = Out.Range->end.line = Out.Pos.line; - Out.Range->start.character = R.first; - Out.Range->end.character = R.second; + Out.Rng.emplace(); + Out.Rng->start.line = Out.Rng->end.line = Out.Pos.line; + Out.Rng->start.character = R.first; + Out.Rng->end.character = R.second; } }; } @@ -70,7 +70,7 @@ struct CapturedDiags { std::string Message; llvm::SourceMgr::DiagKind Kind; Position Pos; - llvm::Optional Range; + llvm::Optional Rng; friend void PrintTo(const Diag &D, std::ostream *OS) { *OS << (D.Kind == llvm::SourceMgr::DK_Error ? "error: " : "warning: ") @@ -83,7 +83,7 @@ struct CapturedDiags { MATCHER_P(DiagMessage, M, "") { return arg.Message == M; } MATCHER_P(DiagKind, K, "") { return arg.Kind == K; } MATCHER_P(DiagPos, P, "") { return arg.Pos == P; } -MATCHER_P(DiagRange, R, "") { return arg.Range == R; } +MATCHER_P(DiagRange, R, "") { return arg.Rng == R; } TEST(ParseYAML, SyntacticForms) { CapturedDiags Diags; -- 2.7.4