Author: Haojian Wu
Date: 2019-11-18T15:03:11+01:00
New Revision: f21b2d8e42f87ad6958599a385ed7bbc4df86de6

URL: 
https://github.com/llvm/llvm-project/commit/f21b2d8e42f87ad6958599a385ed7bbc4df86de6
DIFF: 
https://github.com/llvm/llvm-project/commit/f21b2d8e42f87ad6958599a385ed7bbc4df86de6.diff

LOG: [clangd] Fix diagnostic warnings in the RenameTests, NFC.

Added: 
    

Modified: 
    clang-tools-extra/clangd/unittests/RenameTests.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/unittests/RenameTests.cpp 
b/clang-tools-extra/clangd/unittests/RenameTests.cpp
index c4ee649e5001..212d9c089f92 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);


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to