[clang-tools-extra] r272852 - [clang-tools] mark TokenName as unused

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 15 16:04:42 PDT 2016


Author: tra
Date: Wed Jun 15 18:04:42 2016
New Revision: 272852

URL: http://llvm.org/viewvc/llvm-project?rev=272852&view=rev
Log:
[clang-tools] mark TokenName as unused

Otherwise it produces compiler warning if asserts are disabled.

Modified:
    clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp

Modified: clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp?rev=272852&r1=272851&r2=272852&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp (original)
+++ clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp Wed Jun 15 18:04:42 2016
@@ -92,7 +92,7 @@ public:
       // Handles "~Foo" from "Foo::~Foo".
       SourceLocation Location = DestructorDecl->getLocation();
       const ASTContext &Context = DestructorDecl->getASTContext();
-      StringRef TokenName = Lexer::getSourceText(
+      StringRef LLVM_ATTRIBUTE_UNUSED TokenName = Lexer::getSourceText(
           CharSourceRange::getTokenRange(Location), Context.getSourceManager(),
           Context.getLangOpts());
       // 1 is the length of the "~" string that is not to be touched by the




More information about the cfe-commits mailing list