From: Yaron Keren Date: Fri, 7 Aug 2015 16:21:23 +0000 (+0000) Subject: Use LLVM_ATTRIBUTE_UNUSED to hide gcc 5.1 unused variable warning. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=858b6e42d267e84c23b98fa24212d08aeae037f6;p=clang Use LLVM_ATTRIBUTE_UNUSED to hide gcc 5.1 unused variable warning. Suggestion by David Blaikie! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244326 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Tooling/CompilationDatabase.cpp b/lib/Tooling/CompilationDatabase.cpp index f9de9ba198..c1817b7afc 100644 --- a/lib/Tooling/CompilationDatabase.cpp +++ b/lib/Tooling/CompilationDatabase.cpp @@ -325,7 +325,7 @@ namespace tooling { // This anchor is used to force the linker to link in the generated object file // and thus register the JSONCompilationDatabasePlugin. extern volatile int JSONAnchorSource; -int JSONAnchorDest = JSONAnchorSource; +static int LLVM_ATTRIBUTE_UNUSED JSONAnchorDest = JSONAnchorSource; } // end namespace tooling } // end namespace clang