[cfe-dev] Unused variable in lib/AST/Expr.cpp -- a bug?
Dmitri Gribenko
gribozavr at gmail.com
Mon Jun 11 17:45:27 PDT 2012
On Mon, Jun 11, 2012 at 5:40 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Mon, Jun 11, 2012 at 5:24 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>> Hi,
>>
>> I have found an unused variable (see below). I am not familiar with
>> this code and I am not sure that removing it is the correct fix.
>>
>> Index: lib/AST/Expr.cpp
>> ===================================================================
>> --- lib/AST/Expr.cpp (revision 158328)
>> +++ lib/AST/Expr.cpp (working copy)
>> @@ -702,11 +702,6 @@
>>
>> const char *StrData = Buffer.data()+LocInfo.second;
>>
>> - // Create a langops struct and enable trigraphs. This is sufficient for
>> - // relexing tokens.
>> - LangOptions LangOpts;
>> - LangOpts.Trigraphs = true;
>> -
>> // Create a lexer starting at the beginning of this token.
>> Lexer TheLexer(SM.getLocForStartOfFile(LocInfo.first), Features,
>> Buffer.begin(), StrData, Buffer.end());
>
> That patch looks fine.
OK, thank you. Committed r158343.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
More information about the cfe-dev
mailing list