From 43b7ca7b439dbe562a79d7955c0482bcf0ba0c6b Mon Sep 17 00:00:00 2001 From: Yaron Keren <yaron.keren@gmail.com> Date: Fri, 7 Aug 2015 16:37:34 +0000 Subject: [PATCH] Silence gcc 5.1 unused variable warnings using LLVM_ATTRIBUTE_UNUSED. llvm-svn: 244329 --- clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp index 075df04b69a7..a6d5e8b78977 100644 --- a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp +++ b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp @@ -336,19 +336,19 @@ static int clangTidyMain(int argc, const char **argv) { // This anchor is used to force the linker to link the LLVMModule. extern volatile int LLVMModuleAnchorSource; -static int LLVMModuleAnchorDestination = LLVMModuleAnchorSource; +static int LLVM_ATTRIBUTE_UNUSED LLVMModuleAnchorDestination = LLVMModuleAnchorSource; // This anchor is used to force the linker to link the GoogleModule. extern volatile int GoogleModuleAnchorSource; -static int GoogleModuleAnchorDestination = GoogleModuleAnchorSource; +static int LLVM_ATTRIBUTE_UNUSED GoogleModuleAnchorDestination = GoogleModuleAnchorSource; // This anchor is used to force the linker to link the MiscModule. extern volatile int MiscModuleAnchorSource; -static int MiscModuleAnchorDestination = MiscModuleAnchorSource; +static int LLVM_ATTRIBUTE_UNUSED MiscModuleAnchorDestination = MiscModuleAnchorSource; // This anchor is used to force the linker to link the ReadabilityModule. extern volatile int ReadabilityModuleAnchorSource; -static int ReadabilityModuleAnchorDestination = ReadabilityModuleAnchorSource; +static int LLVM_ATTRIBUTE_UNUSED ReadabilityModuleAnchorDestination = ReadabilityModuleAnchorSource; } // namespace tidy } // namespace clang