]> granicus.if.org Git - clang/commitdiff
Use LLVM_ATTRIBUTE_UNUSED to hide gcc 5.1 unused variable warning.
authorYaron Keren <yaron.keren@gmail.com>
Fri, 7 Aug 2015 16:21:23 +0000 (16:21 +0000)
committerYaron Keren <yaron.keren@gmail.com>
Fri, 7 Aug 2015 16:21:23 +0000 (16:21 +0000)
Suggestion by David Blaikie!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244326 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Tooling/CompilationDatabase.cpp

index f9de9ba19836ff3f4e1692faa317bcc3168af6b8..c1817b7afcccf421ffbee625dd81fac661e33018 100644 (file)
@@ -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