Reverted r304083 as it seems there is a desire to address this in the googletest.
authorGalina Kistanova <gkistanova@gmail.com>
Sun, 28 May 2017 05:50:22 +0000 (05:50 +0000)
committerGalina Kistanova <gkistanova@gmail.com>
Sun, 28 May 2017 05:50:22 +0000 (05:50 +0000)
llvm-svn: 304084

llvm/unittests/Support/CommandLineTest.cpp

index 9b0de45..33573c4 100644 (file)
@@ -180,9 +180,8 @@ void testCommandLineTokenizer(ParserFunction *parse, StringRef Input,
   parse(Input, Saver, Actual, /*MarkEOLs=*/false);
   EXPECT_EQ(OutputSize, Actual.size());
   for (unsigned I = 0, E = Actual.size(); I != E; ++I) {
-    if (I < OutputSize) {
+    if (I < OutputSize)
       EXPECT_STREQ(Output[I], Actual[I]);
-    }
   }
 }
 
@@ -529,9 +528,8 @@ TEST(CommandLineTest, GetRegisteredSubcommands) {
   EXPECT_FALSE(Opt1);
   EXPECT_FALSE(Opt2);
   for (auto *S : cl::getRegisteredSubcommands()) {
-    if (*S) {
+    if (*S)
       EXPECT_EQ("sc1", S->getName());
-    }
   }
 
   cl::ResetAllOptionOccurrences();
@@ -540,9 +538,8 @@ TEST(CommandLineTest, GetRegisteredSubcommands) {
   EXPECT_FALSE(Opt1);
   EXPECT_FALSE(Opt2);
   for (auto *S : cl::getRegisteredSubcommands()) {
-    if (*S) {
+    if (*S)
       EXPECT_EQ("sc2", S->getName());
-    }
   }
 }