diff options
author | Galina Kistanova <gkistanova@gmail.com> | 2017-06-15 21:01:24 +0000 |
---|---|---|
committer | Galina Kistanova <gkistanova@gmail.com> | 2017-06-15 21:01:24 +0000 |
commit | 45fbb597ec728c083abb6bc2b8dace359d8299d2 (patch) | |
tree | 88097e4024b36f5195457bdf23ec0257b8054876 /clang/unittests/Basic/VirtualFileSystemTest.cpp | |
parent | fcae62d6eeabf0eb926555d56e6a79d880ef094b (diff) | |
download | llvm-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.cpp | 6 |
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(); } }; |