[clang-tools-extra] r339416 - [clangd] Fix a "-Wdangling-else" compiler warning in the test.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 10 01:34:16 PDT 2018
Author: hokein
Date: Fri Aug 10 01:34:16 2018
New Revision: 339416
URL: http://llvm.org/viewvc/llvm-project?rev=339416&view=rev
Log:
[clangd] Fix a "-Wdangling-else" compiler warning in the test.
Modified:
clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.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=339416&r1=339415&r2=339416&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp Fri Aug 10 01:34:16 2018
@@ -1393,8 +1393,9 @@ TEST(CompletionTest, FixItForArrowToDot)
ReplacementEdit.newText = ".";
for (const auto &C : Results.Completions) {
EXPECT_TRUE(C.FixIts.size() == 1u || C.Name == "AuxFunction");
- if (!C.FixIts.empty())
+ if (!C.FixIts.empty()) {
EXPECT_THAT(C.FixIts, ElementsAre(ReplacementEdit));
+ }
}
}
More information about the cfe-commits
mailing list