[llvm-branch-commits] [clang-tools-extra] 7ceeae3 - [include-cleaner] Dont pass llvm::StringRef to gtest APIs

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Mar 9 20:42:23 PST 2023


Author: Kadir Cetinkaya
Date: 2023-03-09T20:41:36-08:00
New Revision: 7ceeae360962bde5ae2790fe373ecc1d8076a764

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

LOG: [include-cleaner] Dont pass llvm::StringRef to gtest APIs

Fixes https://github.com/llvm/llvm-project/issues/60884.

(cherry picked from commit 48027f03f2d5fef884ebe118c42f800b90fae2f9)

Added: 
    

Modified: 
    clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp b/clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp
index 967ae829e778d..c34c6c0a29a81 100644
--- a/clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp
+++ b/clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp
@@ -367,7 +367,7 @@ TEST(WalkUsed, FilterRefsNotSpelledInMainFile) {
     if (RefLoc.isValid()) {
       EXPECT_THAT(RefLoc, AllOf(expandedAt(MainFID, Main.point("expand"), &SM),
                                 spelledAt(MainFID, Main.point("spell"), &SM)))
-          << T.Main;
+          << T.Main.str();
     } else {
       EXPECT_THAT(Main.points(), testing::IsEmpty());
     }


        


More information about the llvm-branch-commits mailing list