[llvm] f4bcbdf - Suppress GCC Wdangling-else warning on gtest macros

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 17:36:30 PST 2021


Author: Reid Kleckner
Date: 2021-01-05T17:32:56-08:00
New Revision: f4bcbdf9cea16bf91ba342268f681de45e15733c

URL: https://github.com/llvm/llvm-project/commit/f4bcbdf9cea16bf91ba342268f681de45e15733c
DIFF: https://github.com/llvm/llvm-project/commit/f4bcbdf9cea16bf91ba342268f681de45e15733c.diff

LOG: Suppress GCC Wdangling-else warning on gtest macros

See https://github.com/google/googletest/issues/1119

Added: 
    

Modified: 
    llvm/unittests/Support/CrashRecoveryTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Support/CrashRecoveryTest.cpp b/llvm/unittests/Support/CrashRecoveryTest.cpp
index 864b852cf2d2..c38fa0b4cb25 100644
--- a/llvm/unittests/Support/CrashRecoveryTest.cpp
+++ b/llvm/unittests/Support/CrashRecoveryTest.cpp
@@ -109,8 +109,9 @@ TEST(CrashRecoveryTest, LimitedStackTrace) {
   std::string Str = RawStream.str();
   // FIXME: Handle "Depth" parameter in PrintStackTrace() function
   // to print stack trace upto a specified Depth.
-  if (!Triple(sys::getProcessTriple()).isOSWindows())
+  if (!Triple(sys::getProcessTriple()).isOSWindows()) {
     EXPECT_EQ(std::string::npos, Str.find("#1"));
+  }
 }
 
 #ifdef _WIN32


        


More information about the llvm-commits mailing list