[clang] 45e57a5 - Suppress warning on unused static data member.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 16 17:42:46 PST 2022
Author: Richard Smith
Date: 2022-11-16T17:42:14-08:00
New Revision: 45e57a550f5aa56e934a4fd0f9ed8749a831e445
URL: https://github.com/llvm/llvm-project/commit/45e57a550f5aa56e934a4fd0f9ed8749a831e445
DIFF: https://github.com/llvm/llvm-project/commit/45e57a550f5aa56e934a4fd0f9ed8749a831e445.diff
LOG: Suppress warning on unused static data member.
The member in the specialization is intentionally unused on 32-bit
targets.
Added:
Modified:
clang/lib/Lex/MacroInfo.cpp
Removed:
################################################################################
diff --git a/clang/lib/Lex/MacroInfo.cpp b/clang/lib/Lex/MacroInfo.cpp
index e18b6fb56950..eb69e8eaab77 100644
--- a/clang/lib/Lex/MacroInfo.cpp
+++ b/clang/lib/Lex/MacroInfo.cpp
@@ -34,11 +34,11 @@ namespace {
// and 4 byte SourceLocation.
template <int> class MacroInfoSizeChecker {
public:
- constexpr static bool AsExpected = true;
+ [[maybe_unused]] constexpr static bool AsExpected = true;
};
template <> class MacroInfoSizeChecker<8> {
public:
- constexpr static bool AsExpected =
+ [[maybe_unused]] constexpr static bool AsExpected =
sizeof(MacroInfo) == (32 + sizeof(SourceLocation) * 2);
};
More information about the cfe-commits
mailing list