diff options
author | Galina Kistanova <gkistanova@gmail.com> | 2017-05-28 03:50:52 +0000 |
---|---|---|
committer | Galina Kistanova <gkistanova@gmail.com> | 2017-05-28 03:50:52 +0000 |
commit | 6cb62f7260826b4f0f306f98d8868f39ea34d75e (patch) | |
tree | 81ce800b378749fc84bad086dec4c18548da3a4e /llvm/unittests/Support/CommandLineTest.cpp | |
parent | 2efabeb9339375d1e3651ec3fee64decd0ff91c1 (diff) | |
download | llvm-6cb62f7260826b4f0f306f98d8868f39ea34d75e.zip llvm-6cb62f7260826b4f0f306f98d8868f39ea34d75e.tar.gz llvm-6cb62f7260826b4f0f306f98d8868f39ea34d75e.tar.bz2 |
Added braces to address gcc warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]. NFC.
llvm-svn: 304083
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
-rw-r--r-- | llvm/unittests/Support/CommandLineTest.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/unittests/Support/CommandLineTest.cpp b/llvm/unittests/Support/CommandLineTest.cpp index 33573c4..9b0de45 100644 --- a/llvm/unittests/Support/CommandLineTest.cpp +++ b/llvm/unittests/Support/CommandLineTest.cpp @@ -180,8 +180,9 @@ 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]); + } } } @@ -528,8 +529,9 @@ 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(); @@ -538,8 +540,9 @@ TEST(CommandLineTest, GetRegisteredSubcommands) { EXPECT_FALSE(Opt1); EXPECT_FALSE(Opt2); for (auto *S : cl::getRegisteredSubcommands()) { - if (*S) + if (*S) { EXPECT_EQ("sc2", S->getName()); + } } } |