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); }; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits