aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Basic/VirtualFileSystemTest.cpp
diff options
context:
space:
mode:
authorGalina Kistanova <gkistanova@gmail.com>2017-06-15 21:01:24 +0000
committerGalina Kistanova <gkistanova@gmail.com>2017-06-15 21:01:24 +0000
commit45fbb597ec728c083abb6bc2b8dace359d8299d2 (patch)
tree88097e4024b36f5195457bdf23ec0257b8054876 /clang/unittests/Basic/VirtualFileSystemTest.cpp
parentfcae62d6eeabf0eb926555d56e6a79d880ef094b (diff)
downloadllvm-45fbb597ec728c083abb6bc2b8dace359d8299d2.zip
llvm-45fbb597ec728c083abb6bc2b8dace359d8299d2.tar.gz
llvm-45fbb597ec728c083abb6bc2b8dace359d8299d2.tar.bz2
Added braces to work around gcc warning in googletest: suggest explicit braces to avoid ambiguous 'else'. NFC.
llvm-svn: 305507
Diffstat (limited to 'clang/unittests/Basic/VirtualFileSystemTest.cpp')
-rw-r--r--clang/unittests/Basic/VirtualFileSystemTest.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/unittests/Basic/VirtualFileSystemTest.cpp b/clang/unittests/Basic/VirtualFileSystemTest.cpp
index 0856b17..40add21 100644
--- a/clang/unittests/Basic/VirtualFileSystemTest.cpp
+++ b/clang/unittests/Basic/VirtualFileSystemTest.cpp
@@ -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(); }
};