[cfe-commits] r137915 - /cfe/trunk/lib/Driver/Tools.cpp

Chad Rosier mcrosier at apple.com
Thu Aug 18 10:58:51 PDT 2011


On Aug 17, 2011, at 11:03 PM, Chris Lattner wrote:

> 
> On Aug 17, 2011, at 6:23 PM, Chad Rosier wrote:
> 
>> Author: mcrosier
>> Date: Wed Aug 17 20:23:31 2011
>> New Revision: 137915
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=137915&view=rev
>> Log:
>> Fix off by one.
> 
> Hi Chad,
> 
> Please change this to use "StringRef Option = *it" and Option.startsWith("-W") instead of using C string apis.

Committed in clang revision 137958.  Thanks for pointing this out Chris.

 Chad

> -Chris
> 
>> 
>> Modified:
>>   cfe/trunk/lib/Driver/Tools.cpp
>> 
>> Modified: cfe/trunk/lib/Driver/Tools.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=137915&r1=137914&r2=137915&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Driver/Tools.cpp (original)
>> +++ cfe/trunk/lib/Driver/Tools.cpp Wed Aug 17 20:23:31 2011
>> @@ -2451,7 +2451,7 @@
>>    const char *Option = *it;
>> 
>>    // We only remove warning options.
>> -    if (!strncmp(Option, "-W", 3)) {
>> +    if (!strncmp(Option, "-W", 2)) {
>>      ++it;
>>      continue;
>>    }
>> 
>> 
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 




More information about the cfe-commits mailing list