[cfe-dev] Unused variable in lib/AST/Expr.cpp -- a bug?

Eli Friedman eli.friedman at gmail.com
Mon Jun 11 17:40:06 PDT 2012


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.

-Eli




More information about the cfe-dev mailing list