Added braces to work around gcc warning in googletest: suggest explicit braces to avoid ambiguous 'else'. NFC.

llvm-svn: 305507
This commit is contained in:
Galina Kistanova
2017-06-15 21:01:24 +00:00
parent fcae62d6ee
commit 45fbb597ec
4 changed files with 16 additions and 8 deletions

View File

@@ -300,8 +300,9 @@ struct ScopedDir {
EXPECT_FALSE(EC);
}
~ScopedDir() {
if (Path != "")
if (Path != "") {
EXPECT_FALSE(llvm::sys::fs::remove(Path.str()));
}
}
operator StringRef() { return Path.str(); }
};
@@ -316,8 +317,9 @@ struct ScopedLink {
EXPECT_FALSE(EC);
}
~ScopedLink() {
if (Path != "")
if (Path != "") {
EXPECT_FALSE(llvm::sys::fs::remove(Path.str()));
}
}
operator StringRef() { return Path.str(); }
};