[cfe-commits] r66101 - /cfe/trunk/lib/Driver/OptTable.cpp
Daniel Dunbar
daniel at zuster.org
Wed Mar 4 15:03:35 PST 2009
Author: ddunbar
Date: Wed Mar 4 17:03:35 2009
New Revision: 66101
URL: http://llvm.org/viewvc/llvm-project?rev=66101&view=rev
Log:
Driver: Fix off by one in ParseOneArg; this code is ugly but will be
replaced anyway.
Modified:
cfe/trunk/lib/Driver/OptTable.cpp
Modified: cfe/trunk/lib/Driver/OptTable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/OptTable.cpp?rev=66101&r1=66100&r2=66101&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/OptTable.cpp (original)
+++ cfe/trunk/lib/Driver/OptTable.cpp Wed Mar 4 17:03:35 2009
@@ -127,11 +127,11 @@
return new PositionalArg(getOption(InputOpt), Index++);
for (unsigned j = UnknownOpt + 1; j < getNumOptions(); ++j) {
- const char *OptName = getOptionName((options::ID) (j + 1));
+ const char *OptName = getOptionName((options::ID) j);
// Arguments are only accepted by options which prefix them.
if (memcmp(Str, OptName, strlen(OptName)) == 0)
- if (Arg *A = getOption((options::ID) (j + 1))->accept(Args, Index))
+ if (Arg *A = getOption((options::ID) j)->accept(Args, Index))
return A;
}
More information about the cfe-commits
mailing list