r244326 - Use LLVM_ATTRIBUTE_UNUSED to hide gcc 5.1 unused variable warning.
Yaron Keren via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 7 09:21:23 PDT 2015
Author: yrnkrn
Date: Fri Aug 7 11:21:23 2015
New Revision: 244326
URL: http://llvm.org/viewvc/llvm-project?rev=244326&view=rev
Log:
Use LLVM_ATTRIBUTE_UNUSED to hide gcc 5.1 unused variable warning.
Suggestion by David Blaikie!
Modified:
cfe/trunk/lib/Tooling/CompilationDatabase.cpp
Modified: cfe/trunk/lib/Tooling/CompilationDatabase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/CompilationDatabase.cpp?rev=244326&r1=244325&r2=244326&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/CompilationDatabase.cpp (original)
+++ cfe/trunk/lib/Tooling/CompilationDatabase.cpp Fri Aug 7 11:21:23 2015
@@ -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
More information about the cfe-commits
mailing list