aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/CommandLineTest.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2025-09-18 14:53:40 -0700
committerGitHub <noreply@github.com>2025-09-18 14:53:40 -0700
commit152a2162a1a9c93358bb69ab839931d95b9537ad (patch)
tree287401779a7a607784aaa29c420d0c8ffeb682c8 /llvm/unittests/Support/CommandLineTest.cpp
parentcfaf23927c6b083646a431eb8eea2d286694c0a0 (diff)
downloadllvm-152a2162a1a9c93358bb69ab839931d95b9537ad.zip
llvm-152a2162a1a9c93358bb69ab839931d95b9537ad.tar.gz
llvm-152a2162a1a9c93358bb69ab839931d95b9537ad.tar.bz2
[llvm][clang] Pass VFS to `llvm::cl` command line handling (#159174)
This PR passes the VFS down to `llvm::cl` functions so that they don't assume the real file system.
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
-rw-r--r--llvm/unittests/Support/CommandLineTest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/unittests/Support/CommandLineTest.cpp b/llvm/unittests/Support/CommandLineTest.cpp
index ad06ca9..88e6445 100644
--- a/llvm/unittests/Support/CommandLineTest.cpp
+++ b/llvm/unittests/Support/CommandLineTest.cpp
@@ -1915,20 +1915,20 @@ TEST(CommandLineTest, LongOptions) {
// Fails because `-ab` is treated as `-a -b`, so `-a` is seen twice, and
// `val1` is unexpected.
- EXPECT_FALSE(cl::ParseCommandLineOptions(4, args1, StringRef(),
- &OS, nullptr, true));
+ EXPECT_FALSE(cl::ParseCommandLineOptions(4, args1, StringRef(), &OS, nullptr,
+ nullptr, true));
EXPECT_FALSE(Errs.empty()); Errs.clear();
cl::ResetAllOptionOccurrences();
// Works because `-a` is treated differently than `--ab`.
- EXPECT_TRUE(cl::ParseCommandLineOptions(4, args2, StringRef(),
- &OS, nullptr, true));
+ EXPECT_TRUE(cl::ParseCommandLineOptions(4, args2, StringRef(), &OS, nullptr,
+ nullptr, true));
EXPECT_TRUE(Errs.empty()); Errs.clear();
cl::ResetAllOptionOccurrences();
// Works because `-ab` is treated as `-a -b`, and `--ab` is a long option.
- EXPECT_TRUE(cl::ParseCommandLineOptions(4, args3, StringRef(),
- &OS, nullptr, true));
+ EXPECT_TRUE(cl::ParseCommandLineOptions(4, args3, StringRef(), &OS, nullptr,
+ nullptr, true));
EXPECT_TRUE(OptA);
EXPECT_TRUE(OptBLong);
EXPECT_STREQ("val1", OptAB.c_str());