From f21b2d8e42f87ad6958599a385ed7bbc4df86de6 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 18 Nov 2019 14:56:59 +0100 Subject: [PATCH] [clangd] Fix diagnostic warnings in the RenameTests, NFC. --- clang-tools-extra/clangd/unittests/RenameTests.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clang-tools-extra/clangd/unittests/RenameTests.cpp b/clang-tools-extra/clangd/unittests/RenameTests.cpp index c4ee649..212d9c0 100644 --- a/clang-tools-extra/clangd/unittests/RenameTests.cpp +++ b/clang-tools-extra/clangd/unittests/RenameTests.cpp @@ -128,7 +128,7 @@ TEST(RenameTest, Renameable) { "not eligible for indexing", HeaderFile, Index}, {R"cpp(// disallow -- namespace symbol isn't supported - namespace fo^o {} + namespace n^s {} )cpp", "not a supported kind", HeaderFile, Index}, @@ -142,7 +142,7 @@ TEST(RenameTest, Renameable) { { R"cpp( - struct X { X operator++(int) {} }; + struct X { X operator++(int); }; void f(X x) {x+^+;})cpp", "not a supported kind", HeaderFile, Index}, @@ -167,6 +167,8 @@ TEST(RenameTest, Renameable) { TU.ExtraArgs.push_back("-xobjective-c++-header"); } auto AST = TU.build(); + EXPECT_TRUE(AST.getDiagnostics().empty()) + << AST.getDiagnostics().front() << T.code(); llvm::StringRef NewName = "dummyNewName"; auto Results = renameWithinFile(AST, testPath(TU.Filename), T.point(), NewName, Case.Index); -- 2.7.4