[llvm] 1a1aad9 - [ADT] Fix accidental pointer comparison in test

Sam McCall via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 10:12:08 PDT 2020


Author: Sam McCall
Date: 2020-10-27T18:11:45+01:00
New Revision: 1a1aad9156407bc891e2738e9877c03bd594e67f

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

LOG: [ADT] Fix accidental pointer comparison in test

Added: 
    

Modified: 
    llvm/unittests/ADT/FunctionRefTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/ADT/FunctionRefTest.cpp b/llvm/unittests/ADT/FunctionRefTest.cpp
index f084aa7a660b..47633cada0f3 100644
--- a/llvm/unittests/ADT/FunctionRefTest.cpp
+++ b/llvm/unittests/ADT/FunctionRefTest.cpp
@@ -49,9 +49,9 @@ TEST(FunctionRefTest, BadCopy) {
 }
 
 // Test that overloads on function_refs are resolved as expected.
-const char *returns(StringRef) { return "not a function"; }
-const char *returns(function_ref<double()> F) { return "number"; }
-const char *returns(function_ref<StringRef()> F) { return "string"; }
+std::string returns(StringRef) { return "not a function"; }
+std::string returns(function_ref<double()> F) { return "number"; }
+std::string returns(function_ref<StringRef()> F) { return "string"; }
 
 TEST(FunctionRefTest, SFINAE) {
   EXPECT_EQ("not a function", returns("boo!"));


        


More information about the llvm-commits mailing list