summaryrefslogtreecommitdiff
path: root/unittests/Option
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2013-08-13 22:23:05 +0000
committerHans Wennborg <hans@hanshq.net>2013-08-13 22:23:05 +0000
commitb06ccefc910a32564cb55aaf6fe265182293bfaa (patch)
tree296d7d7767c0d5b2fb0779974fd18e4883d2175c /unittests/Option
parent51a0280d296405cb1fdb268e5387867e0db2e46e (diff)
downloadllvm-b06ccefc910a32564cb55aaf6fe265182293bfaa.tar.gz
llvm-b06ccefc910a32564cb55aaf6fe265182293bfaa.tar.bz2
llvm-b06ccefc910a32564cb55aaf6fe265182293bfaa.tar.xz
Options: explicit handling of --
Clients of the option parsing library should handle it explicitly using a KIND_REMAINING_ARGS option. Clang and lld have been updated in r188316 and r188318, respectively. Also fix -Wsign-compare warning in the option parsing test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Option')
-rw-r--r--unittests/Option/OptionParsingTest.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/unittests/Option/OptionParsingTest.cpp b/unittests/Option/OptionParsingTest.cpp
index 4a7b7b1106..86286d11bd 100644
--- a/unittests/Option/OptionParsingTest.cpp
+++ b/unittests/Option/OptionParsingTest.cpp
@@ -157,19 +157,6 @@ TEST(Option, AliasArgs) {
EXPECT_EQ(AL->getAllArgValues(OPT_B)[1], "bar");
}
-TEST(Option, DashDash) {
- TestOptTable T;
- unsigned MAI, MAC;
-
- const char *MyArgs[] = { "-A", "--", "-B", "--" };
- OwningPtr<InputArgList> AL(T.ParseArgs(MyArgs, array_endof(MyArgs), MAI, MAC));
- EXPECT_TRUE(AL->hasArg(OPT_A));
- EXPECT_FALSE(AL->hasArg(OPT_B));
- EXPECT_EQ(AL->getAllArgValues(OPT_INPUT).size(), 2U);
- EXPECT_EQ(AL->getAllArgValues(OPT_INPUT)[0], "-B");
- EXPECT_EQ(AL->getAllArgValues(OPT_INPUT)[1], "--");
-}
-
TEST(Option, SlurpEmpty) {
TestOptTable T;
unsigned MAI, MAC;
@@ -178,7 +165,7 @@ TEST(Option, SlurpEmpty) {
OwningPtr<InputArgList> AL(T.ParseArgs(MyArgs, array_endof(MyArgs), MAI, MAC));
EXPECT_TRUE(AL->hasArg(OPT_A));
EXPECT_TRUE(AL->hasArg(OPT_Slurp));
- EXPECT_EQ(AL->getAllArgValues(OPT_Slurp).size(), 0);
+ EXPECT_EQ(AL->getAllArgValues(OPT_Slurp).size(), 0U);
}
TEST(Option, Slurp) {