[llvm] 3e5b1b7 - Silence warning with MSVC2019

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 20 11:57:40 PST 2021


Author: Alexandre Ganea
Date: 2021-12-20T14:57:32-05:00
New Revision: 3e5b1b77d554797d4305037334a220fe9bc633ab

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

LOG: Silence warning with MSVC2019

This prevents "warning C4551: function call missing argument list"

Added: 
    

Modified: 
    llvm/unittests/Support/Host.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Support/Host.cpp b/llvm/unittests/Support/Host.cpp
index 9c40cbc910eb..98e83a3ecd77 100644
--- a/llvm/unittests/Support/Host.cpp
+++ b/llvm/unittests/Support/Host.cpp
@@ -403,7 +403,7 @@ static bool runAndGetCommandOutput(
 TEST_F(HostTest, DummyRunAndGetCommandOutputUse) {
   // Suppress defined-but-not-used warnings when the tests using the helper are
   // disabled.
-  (void) runAndGetCommandOutput;
+  (void)&runAndGetCommandOutput;
 }
 
 TEST_F(HostTest, getMacOSHostVersion) {


        


More information about the llvm-commits mailing list