aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/CommandLineTest.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2021-07-08 13:30:14 -0700
committerDavid Blaikie <dblaikie@gmail.com>2021-07-08 13:37:57 -0700
commit1def2579e10dd84405465f403e8c31acebff0c97 (patch)
tree8f8965df36c9eadb466cccd78d1a384ebd550cc5 /llvm/unittests/Support/CommandLineTest.cpp
parenta7992b43a54f89dca7b76cb79d1045acce6dbe1f (diff)
downloadllvm-1def2579e10dd84405465f403e8c31acebff0c97.zip
llvm-1def2579e10dd84405465f403e8c31acebff0c97.tar.gz
llvm-1def2579e10dd84405465f403e8c31acebff0c97.tar.bz2
PR51018: Remove explicit conversions from SmallString to StringRef to future-proof against C++23
C++23 will make these conversions ambiguous - so fix them to make the codebase forward-compatible with C++23 (& a follow-up change I've made will make this ambiguous/invalid even in <C++23 so we don't regress this & it generally improves the code anyway)
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
-rw-r--r--llvm/unittests/Support/CommandLineTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/Support/CommandLineTest.cpp b/llvm/unittests/Support/CommandLineTest.cpp
index 57fae85..7d88046 100644
--- a/llvm/unittests/Support/CommandLineTest.cpp
+++ b/llvm/unittests/Support/CommandLineTest.cpp
@@ -1064,7 +1064,7 @@ TEST(CommandLineTest, ReadConfigFile) {
llvm::SmallString<128> CurrDir;
std::error_code EC = llvm::sys::fs::current_path(CurrDir);
EXPECT_TRUE(!EC);
- EXPECT_TRUE(StringRef(CurrDir) != TestDir.path());
+ EXPECT_NE(CurrDir.str(), TestDir.path());
llvm::BumpPtrAllocator A;
llvm::StringSaver Saver(A);