From 45fbb597ec728c083abb6bc2b8dace359d8299d2 Mon Sep 17 00:00:00 2001 From: Galina Kistanova Date: Thu, 15 Jun 2017 21:01:24 +0000 Subject: Added braces to work around gcc warning in googletest: suggest explicit braces to avoid ambiguous 'else'. NFC. llvm-svn: 305507 --- clang/unittests/Basic/VirtualFileSystemTest.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'clang/unittests/Basic/VirtualFileSystemTest.cpp') diff --git a/clang/unittests/Basic/VirtualFileSystemTest.cpp b/clang/unittests/Basic/VirtualFileSystemTest.cpp index 0856b17791f..40add2195b5 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(); } }; -- cgit v1.2.3