aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/CommandLineTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
-rw-r--r--llvm/unittests/Support/CommandLineTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/unittests/Support/CommandLineTest.cpp b/llvm/unittests/Support/CommandLineTest.cpp
index df33e53..0d0b6ec 100644
--- a/llvm/unittests/Support/CommandLineTest.cpp
+++ b/llvm/unittests/Support/CommandLineTest.cpp
@@ -740,7 +740,7 @@ TEST(CommandLineTest, DefaultOptions) {
StackOption<std::string> SC2_Foo("foo", cl::sub(SC2));
const char *args0[] = {"prog", "-b", "args0 bar string", "-f"};
- EXPECT_TRUE(cl::ParseCommandLineOptions(sizeof(args0) / sizeof(char *), args0,
+ EXPECT_TRUE(cl::ParseCommandLineOptions(std::size(args0), args0,
StringRef(), &llvm::nulls()));
EXPECT_EQ(Bar, "args0 bar string");
EXPECT_TRUE(Foo);
@@ -750,7 +750,7 @@ TEST(CommandLineTest, DefaultOptions) {
cl::ResetAllOptionOccurrences();
const char *args1[] = {"prog", "sc1", "-b", "-bar", "args1 bar string", "-f"};
- EXPECT_TRUE(cl::ParseCommandLineOptions(sizeof(args1) / sizeof(char *), args1,
+ EXPECT_TRUE(cl::ParseCommandLineOptions(std::size(args1), args1,
StringRef(), &llvm::nulls()));
EXPECT_EQ(Bar, "args1 bar string");
EXPECT_TRUE(Foo);
@@ -766,7 +766,7 @@ TEST(CommandLineTest, DefaultOptions) {
const char *args2[] = {"prog", "sc2", "-b", "args2 bar string",
"-f", "-foo", "foo string"};
- EXPECT_TRUE(cl::ParseCommandLineOptions(sizeof(args2) / sizeof(char *), args2,
+ EXPECT_TRUE(cl::ParseCommandLineOptions(std::size(args2), args2,
StringRef(), &llvm::nulls()));
EXPECT_EQ(Bar, "args2 bar string");
EXPECT_TRUE(Foo);