[llvm] 14a23d8 - [llvm][unittests] Silence warning when building with MSVC

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 21 07:08:14 PST 2025


Author: Alexandre Ganea
Date: 2025-12-21T10:08:02-05:00
New Revision: 14a23d81c90e304972da5072a52a0851f98087a1

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

LOG: [llvm][unittests] Silence warning when building with MSVC

Fixes:
```
[836/1441] Building CXX object unittests\ExecutionEngine\Orc\CMakeFiles\OrcJITTests.dir\CallableTraitsHelperTest.cpp.obj
C:\git\llvm-project\llvm\unittests\ExecutionEngine\Orc\CallableTraitsHelperTest.cpp(25): warning C4551: function call missing argument list
C:\git\llvm-project\llvm\unittests\ExecutionEngine\Orc\CallableTraitsHelperTest.cpp(34): warning C4551: function call missing argument list
```

Added: 
    

Modified: 
    llvm/unittests/ExecutionEngine/Orc/CallableTraitsHelperTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/ExecutionEngine/Orc/CallableTraitsHelperTest.cpp b/llvm/unittests/ExecutionEngine/Orc/CallableTraitsHelperTest.cpp
index bfb3d8eefbff3..2b99522e1a655 100644
--- a/llvm/unittests/ExecutionEngine/Orc/CallableTraitsHelperTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/CallableTraitsHelperTest.cpp
@@ -22,7 +22,7 @@ using namespace llvm::orc;
 static void freeVoidVoid() {}
 
 TEST(CallableTraitsHelperTest, FreeVoidVoid) {
-  (void)freeVoidVoid;
+  freeVoidVoid();
   typedef CallableArgInfo<decltype(freeVoidVoid)> CAI;
   static_assert(std::is_void_v<CAI::ReturnType>);
   static_assert(std::is_same_v<CAI::ArgsTupleType, std::tuple<>>);
@@ -31,7 +31,7 @@ TEST(CallableTraitsHelperTest, FreeVoidVoid) {
 static int freeBinaryOp(int, float) { return 0; }
 
 TEST(CallableTraitsHelperTest, FreeBinaryOp) {
-  (void)freeBinaryOp;
+  freeBinaryOp(1, 2.0f);
   typedef CallableArgInfo<decltype(freeBinaryOp)> CAI;
   static_assert(std::is_same_v<CAI::ReturnType, int>);
   static_assert(std::is_same_v<CAI::ArgsTupleType, std::tuple<int, float>>);


        


More information about the llvm-commits mailing list