Author: d0k Date: Sat Oct 14 21:27:37 2017 New Revision: 315845 URL: http://llvm.org/viewvc/llvm-project?rev=315845&view=rev Log: [Lex] Remove unused variables. No functionality change.
Modified: cfe/trunk/include/clang/Lex/VariadicMacroSupport.h cfe/trunk/lib/Lex/TokenLexer.cpp Modified: cfe/trunk/include/clang/Lex/VariadicMacroSupport.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/VariadicMacroSupport.h?rev=315845&r1=315844&r2=315845&view=diff ============================================================================== --- cfe/trunk/include/clang/Lex/VariadicMacroSupport.h (original) +++ cfe/trunk/include/clang/Lex/VariadicMacroSupport.h Sat Oct 14 21:27:37 2017 @@ -69,8 +69,6 @@ namespace clang { /// \brief A class for tracking whether we're inside a VA_OPT during a /// traversal of the tokens of a variadic macro definition. class VAOptDefinitionContext { - Preprocessor &PP; - /// Contains all the locations of so far unmatched lparens. SmallVector<SourceLocation, 8> UnmatchedOpeningParens; @@ -79,7 +77,7 @@ namespace clang { public: VAOptDefinitionContext(Preprocessor &PP) - : PP(PP), Ident__VA_OPT__(PP.Ident__VA_OPT__) {} + : Ident__VA_OPT__(PP.Ident__VA_OPT__) {} bool isVAOptToken(const Token &T) const { return Ident__VA_OPT__ && T.getIdentifierInfo() == Ident__VA_OPT__; Modified: cfe/trunk/lib/Lex/TokenLexer.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/TokenLexer.cpp?rev=315845&r1=315844&r2=315845&view=diff ============================================================================== --- cfe/trunk/lib/Lex/TokenLexer.cpp (original) +++ cfe/trunk/lib/Lex/TokenLexer.cpp Sat Oct 14 21:27:37 2017 @@ -184,18 +184,12 @@ void TokenLexer::stringifyVAOPTContents( // Perform token pasting (concatenation) prior to stringization. for (unsigned int CurTokenIdx = 0; CurTokenIdx != NumVAOptTokens; ++CurTokenIdx) { - const unsigned int PrevTokenIdx = CurTokenIdx; - if (VAOPTTokens[CurTokenIdx].is(tok::hashhash)) { assert(CurTokenIdx != 0 && "Can not have __VAOPT__ contents begin with a ##"); Token &LHS = VAOPTTokens[CurTokenIdx - 1]; pasteTokens(LHS, llvm::makeArrayRef(VAOPTTokens, NumVAOptTokens), CurTokenIdx); - // CurTokenIdx is either the same as NumTokens or one past the - // last token concatenated. - // PrevTokenIdx is the index of the hashhash - const unsigned NumTokensPastedTogether = CurTokenIdx - PrevTokenIdx + 1; // Replace the token prior to the first ## in this iteration. ConcatenatedVAOPTResultToks.back() = LHS; if (CurTokenIdx == NumVAOptTokens) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits