llvm.org GIT mirror llvm / e6864c1
Remove duplicated colons and spaces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77892 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 10 years ago
3 changed file(s) with 23 addition(s) and 23 deletion(s). Raw diff Collapse all Expand all
18821882
18831883 default:
18841884 // Print an error message if unrecognized character!
1885 return O.error(": '" + Arg + "' value invalid for file size argument!");
1885 return O.error("'" + Arg + "' value invalid for file size argument!");
18861886 }
18871887 }
18881888 }
472472 return false;
473473 }
474474
475 return O.error(": Cannot find option named '" + ArgVal + "'!");
475 return O.error("Cannot find option named '" + ArgVal + "'!");
476476 }
477477
478478 /// addLiteralOption - Add an entry to the mapping table.
769769
770770 bool setLocation(Option &O, DataType &L) {
771771 if (Location)
772 return O.error(": cl::location(x) specified more than once!");
772 return O.error("cl::location(x) specified more than once!");
773773 Location = &L;
774774 return false;
775775 }
963963
964964 bool setLocation(Option &O, StorageClass &L) {
965965 if (Location)
966 return O.error(": cl::location(x) specified more than once!");
966 return O.error("cl::location(x) specified more than once!");
967967 Location = &L;
968968 return false;
969969 }
11381138
11391139 bool setLocation(Option &O, unsigned &L) {
11401140 if (Location)
1141 return O.error(": cl::location(x) specified more than once!");
1141 return O.error("cl::location(x) specified more than once!");
11421142 Location = &L;
11431143 return false;
11441144 }
13161316
13171317 void done() {
13181318 if (!hasArgStr())
1319 error(": cl::alias must have argument name specified!");
1319 error("cl::alias must have argument name specified!");
13201320 if (AliasFor == 0)
1321 error(": cl::alias must have an cl::aliasopt(option) specified!");
1321 error("cl::alias must have an cl::aliasopt(option) specified!");
13221322 addArgument();
13231323 }
13241324 public:
13251325 void setAliasFor(Option &O) {
13261326 if (AliasFor)
1327 error(": cl::alias must only have one cl::aliasopt(...) specified!");
1327 error("cl::alias must only have one cl::aliasopt(...) specified!");
13281328 AliasFor = &O;
13291329 }
13301330
186186 if (i+1 < argc) { // Steal the next argument, like for '-o filename'
187187 Value = argv[++i];
188188 } else {
189 return Handler->error(" requires a value!");
189 return Handler->error("requires a value!");
190190 }
191191 }
192192 break;
193193 case ValueDisallowed:
194194 if (NumAdditionalVals > 0)
195 return Handler->error(": multi-valued option specified"
195 return Handler->error("multi-valued option specified"
196196 " with ValueDisallowed modifier!");
197197
198198 if (Value)
199 return Handler->error(" does not allow a value! '" +
199 return Handler->error("does not allow a value! '" +
200200 std::string(Value) + "' specified.");
201201 break;
202202 case ValueOptional:
228228 if (i+1 < argc) {
229229 Value = argv[++i];
230230 } else {
231 return Handler->error(": not enough values!");
231 return Handler->error("not enough values!");
232232 }
233233 if (Handler->addOccurrence(i, ArgName, Value, MultiArg))
234234 return true;
469469 // unless there is only one positional argument...
470470 if (PositionalOpts.size() > 2)
471471 ErrorParsing |=
472 Opt->error(" error - this positional option will never be matched, "
472 Opt->error("error - this positional option will never be matched, "
473473 "because it does not Require a value, and a "
474474 "cl::ConsumeAfter option is active!");
475475 } else if (UnboundedFound && !Opt->ArgStr[0]) {
477477 // not specified after an option that eats all extra arguments, or this
478478 // one will never get any!
479479 //
480 ErrorParsing |= Opt->error(" error - option can never match, because "
480 ErrorParsing |= Opt->error("error - option can never match, because "
481481 "another positional argument will match an "
482482 "unbounded number of values, and this option"
483483 " does not require a value!");
736736 case Required:
737737 case OneOrMore:
738738 if (I->second->getNumOccurrences() == 0) {
739 I->second->error(" must be specified at least once!");
739 I->second->error("must be specified at least once!");
740740 ErrorParsing = true;
741741 }
742742 // Fall through
787787 switch (getNumOccurrencesFlag()) {
788788 case Optional:
789789 if (NumOccurrences > 1)
790 return error(": may only occur zero or one times!", ArgName);
790 return error("may only occur zero or one times!", ArgName);
791791 break;
792792 case Required:
793793 if (NumOccurrences > 1)
794 return error(": must occur exactly one time!", ArgName);
794 return error("must occur exactly one time!", ArgName);
795795 // Fall through
796796 case OneOrMore:
797797 case ZeroOrMore:
798798 case ConsumeAfter: break;
799 default: return error(": bad num occurrences flag value!");
799 default: return error("bad num occurrences flag value!");
800800 }
801801
802802 return handleOccurrence(pos, ArgName, Value);
872872 } else if (Arg == "false" || Arg == "FALSE" || Arg == "False" || Arg == "0") {
873873 Value = false;
874874 } else {
875 return O.error(": '" + Arg +
875 return O.error("'" + Arg +
876876 "' is invalid value for boolean argument! Try 0 or 1");
877877 }
878878 return false;
889889 || Arg == "False" || Arg == "0") {
890890 Value = BOU_FALSE;
891891 } else {
892 return O.error(": '" + Arg +
892 return O.error("'" + Arg +
893893 "' is invalid value for boolean argument! Try 0 or 1");
894894 }
895895 return false;
902902 char *End;
903903 Value = (int)strtol(Arg.c_str(), &End, 0);
904904 if (*End != 0)
905 return O.error(": '" + Arg + "' value invalid for integer argument!");
905 return O.error("'" + Arg + "' value invalid for integer argument!");
906906 return false;
907907 }
908908
917917 if (((V == ULONG_MAX) && (errno == ERANGE))
918918 || (*End != 0)
919919 || (Value != V))
920 return O.error(": '" + Arg + "' value invalid for uint argument!");
920 return O.error("'" + Arg + "' value invalid for uint argument!");
921921 return false;
922922 }
923923
928928 char *End;
929929 Value = strtod(ArgStart, &End);
930930 if (*End != 0)
931 return O.error(": '" +Arg+ "' value invalid for floating point argument!");
931 return O.error("'" + Arg + "' value invalid for floating point argument!");
932932 return false;
933933 }
934934