diff options
| author | Galina Kistanova <gkistanova@gmail.com> | 2017-06-15 21:00:40 +0000 |
|---|---|---|
| committer | Galina Kistanova <gkistanova@gmail.com> | 2017-06-15 21:00:40 +0000 |
| commit | fcae62d6eeabf0eb926555d56e6a79d880ef094b (patch) | |
| tree | b8c21b18da971b9c5ea78ddef9a16c1ddd1500db /llvm/unittests/ADT/SCCIteratorTest.cpp | |
| parent | da504b794cf3154ec9b3f0fb728f1b3880a8bb77 (diff) | |
| download | bcm5719-llvm-fcae62d6eeabf0eb926555d56e6a79d880ef094b.tar.gz bcm5719-llvm-fcae62d6eeabf0eb926555d56e6a79d880ef094b.zip | |
Added braces to work around gcc warning in googletest: suggest explicit braces to avoid ambiguous 'else'. NFC.
llvm-svn: 305506
Diffstat (limited to 'llvm/unittests/ADT/SCCIteratorTest.cpp')
| -rw-r--r-- | llvm/unittests/ADT/SCCIteratorTest.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/unittests/ADT/SCCIteratorTest.cpp b/llvm/unittests/ADT/SCCIteratorTest.cpp index ca6d84ed2f3..57a999bea9d 100644 --- a/llvm/unittests/ADT/SCCIteratorTest.cpp +++ b/llvm/unittests/ADT/SCCIteratorTest.cpp @@ -63,8 +63,9 @@ TEST(SCCIteratorTest, AllSmallGraphs) { // Check that every node in the SCC is reachable from every other node in // the SCC. for (unsigned i = 0; i != NUM_NODES; ++i) - if (NodesInThisSCC.count(i)) + if (NodesInThisSCC.count(i)) { EXPECT_TRUE(NodesInThisSCC.isSubsetOf(G.NodesReachableFrom(i))); + } // OK, now that we now that every node in the SCC is reachable from every // other, this means that the set of nodes reachable from any node in the @@ -78,8 +79,9 @@ TEST(SCCIteratorTest, AllSmallGraphs) { NodesReachableFromSCC.Meet(NodesInThisSCC.Complement()); for (unsigned j = 0; j != NUM_NODES; ++j) - if (ReachableButNotInSCC.count(j)) + if (ReachableButNotInSCC.count(j)) { EXPECT_TRUE(G.NodesReachableFrom(j).Meet(NodesInThisSCC).isEmpty()); + } // The result must be the same for all other nodes in this SCC, so // there is no point in checking them. |

