Home
last modified time | relevance | path

Searched refs:Opt (Results 1 – 25 of 276) sorted by relevance

12345678910>>...12

/external/rust/crates/structopt/tests/
Doptions.rs14 struct Opt { in required_option() struct
19 Opt { arg: 42 }, in required_option()
20 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a42"])) in required_option()
23 Opt { arg: 42 }, in required_option()
24 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a", "42"])) in required_option()
27 Opt { arg: 42 }, in required_option()
28 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "--arg", "42"])) in required_option()
30 assert!(Opt::clap().get_matches_from_safe(&["test"]).is_err()); in required_option()
31 assert!(Opt::clap() in required_option()
39 struct Opt { in optional_option() struct
[all …]
Dargument_naming.rs6 enum Opt { in test_single_word_enum_variant_is_default_renamed_into_kebab_case() enum
11 Opt::Command { foo: 0 }, in test_single_word_enum_variant_is_default_renamed_into_kebab_case()
12 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "command", "0"])) in test_single_word_enum_variant_is_default_renamed_into_kebab_case()
19 enum Opt { in test_multi_word_enum_variant_is_renamed() enum
24 Opt::FirstCommand { foo: 0 }, in test_multi_word_enum_variant_is_renamed()
25 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "first-command", "0"])) in test_multi_word_enum_variant_is_renamed()
33 struct Opt { in test_standalone_long_generates_kebab_case() struct
39 Opt { FOO_OPTION: true }, in test_standalone_long_generates_kebab_case()
40 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "--foo-option"])) in test_standalone_long_generates_kebab_case()
47 struct Opt { in test_custom_long_overwrites_default_name() struct
[all …]
Dflags.rs14 struct Opt { in unique_flag() struct
20 Opt { alice: false }, in unique_flag()
21 Opt::from_clap(&Opt::clap().get_matches_from(&["test"])) in unique_flag()
24 Opt { alice: true }, in unique_flag()
25 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a"])) in unique_flag()
28 Opt { alice: true }, in unique_flag()
29 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "--alice"])) in unique_flag()
31 assert!(Opt::clap().get_matches_from_safe(&["test", "-i"]).is_err()); in unique_flag()
32 assert!(Opt::clap() in unique_flag()
35 assert!(Opt::clap() in unique_flag()
[all …]
Darguments.rs15 struct Opt { in required_argument() struct
18 assert_eq!(Opt { arg: 42 }, Opt::from_iter(&["test", "42"])); in required_argument()
19 assert!(Opt::clap().get_matches_from_safe(&["test"]).is_err()); in required_argument()
20 assert!(Opt::clap() in required_argument()
28 struct Opt { in optional_argument() struct
31 assert_eq!(Opt { arg: Some(42) }, Opt::from_iter(&["test", "42"])); in optional_argument()
32 assert_eq!(Opt { arg: None }, Opt::from_iter(&["test"])); in optional_argument()
33 assert!(Opt::clap() in optional_argument()
41 struct Opt { in argument_with_default() struct
45 assert_eq!(Opt { arg: 24 }, Opt::from_iter(&["test", "24"])); in argument_with_default()
[all …]
Dsubcommands.rs15 enum Opt { enum
37 Opt::Fetch { in test_fetch()
42 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "fetch", "--all", "origin"])) in test_fetch()
45 Opt::Fetch { in test_fetch()
50 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "fetch", "-f", "origin"])) in test_fetch()
57 Opt::Add { in test_add()
61 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "add"])) in test_add()
64 Opt::Add { in test_add()
68 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "add", "-i", "-v"])) in test_add()
74 let result = Opt::clap().get_matches_from_safe(&["test", "badcmd", "-i", "-v"]); in test_no_parse()
[all …]
Dnon_literal_attributes.rs17 struct Opt { struct
40 Opt { in test_slice() argument
46 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-l", "1"])) in test_slice()
49 Opt { in test_slice()
55 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "--level", "1"])) in test_slice()
58 Opt { in test_slice()
64 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "--set-level", "1"])) in test_slice()
67 Opt { in test_slice()
73 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "--lvl", "1"])) in test_slice()
80 Opt { in test_multi_args()
[all …]
Dflatten.rs21 struct Opt { in flatten() struct
26 Opt { in flatten()
29 Opt::from_iter(&["test", "42"]) in flatten()
31 assert!(Opt::clap().get_matches_from_safe(&["test"]).is_err()); in flatten()
32 assert!(Opt::clap() in flatten()
46 struct Opt { in flatten_twice() struct
53 Opt::from_iter(&["test", "42", "43"]); in flatten_twice()
72 enum Opt { in flatten_in_subcommand() enum
84 Opt::Fetch { in flatten_in_subcommand()
88 Opt::from_iter(&["test", "fetch", "42"]) in flatten_in_subcommand()
[all …]
Dskip.rs14 struct Opt { in skip_1() struct
21 assert!(Opt::from_iter_safe(&["test", "-x", "10", "20"]).is_err()); in skip_1()
23 Opt::from_iter(&["test", "-x", "10"]), in skip_1()
24 Opt { in skip_1()
34 struct Opt { in skip_2() struct
48 Opt::from_iter(&["test", "-x", "10", "20", "30"]), in skip_2()
49 Opt { in skip_2()
76 pub struct Opt { in skip_enum() struct
86 Opt::from_iter(&["test", "-n", "10"]), in skip_enum()
87 Opt { in skip_enum()
[all …]
Dnested-subcommands.rs12 struct Opt { struct
39 let result = Opt::clap().get_matches_from_safe(&["test"]); in test_no_cmd() argument
55 Opt { in test_fetch()
60 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-vvv", "fetch"])) in test_fetch()
63 Opt { in test_fetch()
68 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "--force", "fetch"])) in test_fetch()
75 Opt { in test_add()
80 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "add"])) in test_add()
83 Opt { in test_add()
88 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-vv", "add"])) in test_add()
[all …]
Dcustom-string-parsers.rs209 struct Opt { in test_custom_bool() struct
224 assert!(Opt::clap().get_matches_from_safe(&["test"]).is_err()); in test_custom_bool()
225 assert!(Opt::clap().get_matches_from_safe(&["test", "-d"]).is_err()); in test_custom_bool()
226 assert!(Opt::clap() in test_custom_bool()
230 Opt { in test_custom_bool()
236 Opt::from_iter(&["test", "-dfalse"]) in test_custom_bool()
239 Opt { in test_custom_bool()
245 Opt::from_iter(&["test", "-dtrue"]) in test_custom_bool()
248 Opt { in test_custom_bool()
254 Opt::from_iter(&["test", "-dtrue", "-vfalse"]) in test_custom_bool()
[all …]
Dspecial_types.rs23 struct Opt { in special_types_bool() struct
28 Opt { in special_types_bool()
31 Opt::from_iter(&["test", "success"]) in special_types_bool()
42 struct Opt { in special_types_option() struct
48 Opt { in special_types_option()
51 Opt::from_iter(&["test", "success"]) in special_types_option()
62 struct Opt { in special_types_vec() struct
68 Opt { in special_types_vec()
71 Opt::from_iter(&["test", "success"]) in special_types_vec()
Ddefault_value.rs10 struct Opt { in auto_default_value() struct
14 assert_eq!(Opt { arg: 0 }, Opt::from_iter(&["test"])); in auto_default_value()
15 assert_eq!(Opt { arg: 1 }, Opt::from_iter(&["test", "1"])); in auto_default_value()
17 let help = get_long_help::<Opt>(); in auto_default_value()
/external/clang/lib/Basic/
DWarnings.cpp37 StringRef Opt) { in EmitUnknownDiagWarning() argument
38 StringRef Suggestion = DiagnosticIDs::getNearestOption(Flavor, Opt); in EmitUnknownDiagWarning()
40 << (Flavor == diag::Flavor::WarningOrError ? 0 : 1) << (Prefix.str() += Opt) in EmitUnknownDiagWarning()
90 StringRef Opt = Opts.Warnings[i]; in ProcessWarningOptions() local
94 if (Opt == "format=0") in ProcessWarningOptions()
95 Opt = "no-format"; in ProcessWarningOptions()
100 if (Opt.startswith("no-")) { in ProcessWarningOptions()
102 Opt = Opt.substr(3); in ProcessWarningOptions()
112 if (Opt == "system-headers") { in ProcessWarningOptions()
120 if (Opt == "everything") { in ProcessWarningOptions()
[all …]
/external/llvm-project/clang/lib/Basic/
DWarnings.cpp36 StringRef Opt) { in EmitUnknownDiagWarning() argument
37 StringRef Suggestion = DiagnosticIDs::getNearestOption(Flavor, Opt); in EmitUnknownDiagWarning()
40 << (Prefix.str() += std::string(Opt)) << !Suggestion.empty() in EmitUnknownDiagWarning()
90 StringRef Opt = Opts.Warnings[i]; in ProcessWarningOptions() local
94 if (Opt == "format=0") in ProcessWarningOptions()
95 Opt = "no-format"; in ProcessWarningOptions()
100 if (Opt.startswith("no-")) { in ProcessWarningOptions()
102 Opt = Opt.substr(3); in ProcessWarningOptions()
112 if (Opt == "system-headers") { in ProcessWarningOptions()
120 if (Opt == "everything") { in ProcessWarningOptions()
[all …]
/external/catch2/include/internal/
Dcatch_commandline.cpp134 | Opt( config.listTests ) in makeCommandLineParser()
137 | Opt( config.listTags ) in makeCommandLineParser()
140 | Opt( config.showSuccessfulTests ) in makeCommandLineParser()
143 | Opt( config.shouldDebugBreak ) in makeCommandLineParser()
146 | Opt( config.noThrow ) in makeCommandLineParser()
149 | Opt( config.showInvisibles ) in makeCommandLineParser()
152 | Opt( config.outputFilename, "filename" ) in makeCommandLineParser()
155 | Opt( setReporter, "name" ) in makeCommandLineParser()
158 | Opt( config.name, "name" ) in makeCommandLineParser()
161 | Opt( [&]( bool ){ config.abortAfter = 1; } ) in makeCommandLineParser()
[all …]
/external/llvm-project/llvm/lib/FuzzMutate/
DFuzzerCLI.cpp48 for (StringRef Opt : Opts) { in handleExecNameEncodedBEOpts() local
49 if (Opt.equals("gisel")) { in handleExecNameEncodedBEOpts()
53 } else if (Opt.startswith("O")) { in handleExecNameEncodedBEOpts()
54 Args.push_back("-" + Opt.str()); in handleExecNameEncodedBEOpts()
55 } else if (Triple(Opt).getArch()) { in handleExecNameEncodedBEOpts()
56 Args.push_back("-mtriple=" + Opt.str()); in handleExecNameEncodedBEOpts()
58 errs() << ExecName << ": Unknown option: " << Opt << ".\n"; in handleExecNameEncodedBEOpts()
85 for (StringRef Opt : Opts) { in handleExecNameEncodedOptimizerOpts() local
86 if (Opt == "instcombine") { in handleExecNameEncodedOptimizerOpts()
88 } else if (Opt == "earlycse") { in handleExecNameEncodedOptimizerOpts()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/FuzzMutate/
DFuzzerCLI.cpp47 for (StringRef Opt : Opts) { in handleExecNameEncodedBEOpts() local
48 if (Opt.equals("gisel")) { in handleExecNameEncodedBEOpts()
52 } else if (Opt.startswith("O")) { in handleExecNameEncodedBEOpts()
53 Args.push_back("-" + Opt.str()); in handleExecNameEncodedBEOpts()
54 } else if (Triple(Opt).getArch()) { in handleExecNameEncodedBEOpts()
55 Args.push_back("-mtriple=" + Opt.str()); in handleExecNameEncodedBEOpts()
57 errs() << ExecName << ": Unknown option: " << Opt << ".\n"; in handleExecNameEncodedBEOpts()
84 for (StringRef Opt : Opts) { in handleExecNameEncodedOptimizerOpts() local
85 if (Opt == "instcombine") { in handleExecNameEncodedOptimizerOpts()
87 } else if (Opt == "earlycse") { in handleExecNameEncodedOptimizerOpts()
[all …]
/external/llvm-project/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/
Dnullopt_t.pass.cpp26 template <class Opt>
30 static_assert(std::is_nothrow_constructible<Opt, nullopt_t&>::value, ""); in test_constexpr()
31 static_assert(std::is_trivially_destructible<Opt>::value, ""); in test_constexpr()
32 static_assert(std::is_trivially_destructible<typename Opt::value_type>::value, ""); in test_constexpr()
34 constexpr Opt opt(nullopt); in test_constexpr()
38 : public Opt in test_constexpr()
44 template <class Opt>
48 static_assert(std::is_nothrow_constructible<Opt, nullopt_t&>::value, ""); in test()
49 static_assert(!std::is_trivially_destructible<Opt>::value, ""); in test()
50 static_assert(!std::is_trivially_destructible<typename Opt::value_type>::value, ""); in test()
[all …]
Ddefault.pass.cpp23 template <class Opt>
27 static_assert(std::is_nothrow_default_constructible<Opt>::value, ""); in test_constexpr()
28 static_assert(std::is_trivially_destructible<Opt>::value, ""); in test_constexpr()
29 static_assert(std::is_trivially_destructible<typename Opt::value_type>::value, ""); in test_constexpr()
31 constexpr Opt opt; in test_constexpr()
35 : public Opt in test_constexpr()
41 template <class Opt>
45 static_assert(std::is_nothrow_default_constructible<Opt>::value, ""); in test()
46 static_assert(!std::is_trivially_destructible<Opt>::value, ""); in test()
47 static_assert(!std::is_trivially_destructible<typename Opt::value_type>::value, ""); in test()
[all …]
/external/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/
Dnullopt_t.pass.cpp25 template <class Opt>
29 static_assert(std::is_nothrow_constructible<Opt, nullopt_t&>::value, ""); in test_constexpr()
30 static_assert(std::is_trivially_destructible<Opt>::value, ""); in test_constexpr()
31 static_assert(std::is_trivially_destructible<typename Opt::value_type>::value, ""); in test_constexpr()
33 constexpr Opt opt(nullopt); in test_constexpr()
37 : public Opt in test_constexpr()
43 template <class Opt>
47 static_assert(std::is_nothrow_constructible<Opt, nullopt_t&>::value, ""); in test()
48 static_assert(!std::is_trivially_destructible<Opt>::value, ""); in test()
49 static_assert(!std::is_trivially_destructible<typename Opt::value_type>::value, ""); in test()
[all …]
Ddefault.pass.cpp24 template <class Opt>
28 static_assert(std::is_nothrow_default_constructible<Opt>::value, ""); in test_constexpr()
29 static_assert(std::is_trivially_destructible<Opt>::value, ""); in test_constexpr()
30 static_assert(std::is_trivially_destructible<typename Opt::value_type>::value, ""); in test_constexpr()
32 constexpr Opt opt; in test_constexpr()
36 : public Opt in test_constexpr()
42 template <class Opt>
46 static_assert(std::is_nothrow_default_constructible<Opt>::value, ""); in test()
47 static_assert(!std::is_trivially_destructible<Opt>::value, ""); in test()
48 static_assert(!std::is_trivially_destructible<typename Opt::value_type>::value, ""); in test()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Option/
DArgList.cpp242 Arg *DerivedArgList::MakeFlagArg(const Arg *BaseArg, const Option Opt) const { in MakeFlagArg()
244 std::make_unique<Arg>(Opt, MakeArgString(Opt.getPrefix() + Opt.getName()), in MakeFlagArg()
245 BaseArgs.MakeIndex(Opt.getName()), BaseArg)); in MakeFlagArg()
249 Arg *DerivedArgList::MakePositionalArg(const Arg *BaseArg, const Option Opt, in MakePositionalArg() argument
253 std::make_unique<Arg>(Opt, MakeArgString(Opt.getPrefix() + Opt.getName()), in MakePositionalArg()
258 Arg *DerivedArgList::MakeSeparateArg(const Arg *BaseArg, const Option Opt, in MakeSeparateArg() argument
260 unsigned Index = BaseArgs.MakeIndex(Opt.getName(), Value); in MakeSeparateArg()
262 std::make_unique<Arg>(Opt, MakeArgString(Opt.getPrefix() + Opt.getName()), in MakeSeparateArg()
267 Arg *DerivedArgList::MakeJoinedArg(const Arg *BaseArg, const Option Opt, in MakeJoinedArg() argument
269 unsigned Index = BaseArgs.MakeIndex((Opt.getName() + Value).str()); in MakeJoinedArg()
[all …]
/external/llvm-project/llvm/lib/Option/
DArgList.cpp242 Arg *DerivedArgList::MakeFlagArg(const Arg *BaseArg, const Option Opt) const { in MakeFlagArg()
244 std::make_unique<Arg>(Opt, MakeArgString(Opt.getPrefix() + Opt.getName()), in MakeFlagArg()
245 BaseArgs.MakeIndex(Opt.getName()), BaseArg)); in MakeFlagArg()
249 Arg *DerivedArgList::MakePositionalArg(const Arg *BaseArg, const Option Opt, in MakePositionalArg() argument
253 std::make_unique<Arg>(Opt, MakeArgString(Opt.getPrefix() + Opt.getName()), in MakePositionalArg()
258 Arg *DerivedArgList::MakeSeparateArg(const Arg *BaseArg, const Option Opt, in MakeSeparateArg() argument
260 unsigned Index = BaseArgs.MakeIndex(Opt.getName(), Value); in MakeSeparateArg()
262 std::make_unique<Arg>(Opt, MakeArgString(Opt.getPrefix() + Opt.getName()), in MakeSeparateArg()
267 Arg *DerivedArgList::MakeJoinedArg(const Arg *BaseArg, const Option Opt, in MakeJoinedArg() argument
269 unsigned Index = BaseArgs.MakeIndex((Opt.getName() + Value).str()); in MakeJoinedArg()
[all …]
DArg.cpp21 Arg::Arg(const Option Opt, StringRef S, unsigned Index, const Arg *BaseArg) in Arg() argument
22 : Opt(Opt), BaseArg(BaseArg), Spelling(S), Index(Index), Claimed(false), in Arg()
25 Arg::Arg(const Option Opt, StringRef S, unsigned Index, const char *Value0, in Arg() argument
27 : Opt(Opt), BaseArg(BaseArg), Spelling(S), Index(Index), Claimed(false), in Arg()
32 Arg::Arg(const Option Opt, StringRef S, unsigned Index, const char *Value0, in Arg() argument
34 : Opt(Opt), BaseArg(BaseArg), Spelling(S), Index(Index), Claimed(false), in Arg()
51 Opt.print(O); in print()
/external/llvm-project/llvm/include/llvm/IR/
DStatepoint.h148 if (auto Opt = getOperandBundle(LLVMContext::OB_gc_transition)) in gc_transition_args_begin() local
149 return Opt->Inputs.begin(); in gc_transition_args_begin()
153 if (auto Opt = getOperandBundle(LLVMContext::OB_gc_transition)) in gc_transition_args_end() local
154 return Opt->Inputs.end(); in gc_transition_args_end()
164 if (auto Opt = getOperandBundle(LLVMContext::OB_deopt)) in deopt_begin() local
165 return Opt->Inputs.begin(); in deopt_begin()
169 if (auto Opt = getOperandBundle(LLVMContext::OB_deopt)) in deopt_end() local
170 return Opt->Inputs.end(); in deopt_end()
182 if (auto Opt = getOperandBundle(LLVMContext::OB_gc_live)) in gc_args_begin() local
183 return Opt->Inputs.begin(); in gc_args_begin()
[all …]

12345678910>>...12