diff --git a/gn/skia/BUILD.gn b/gn/skia/BUILD.gn index 4c5f6d5674..8038136f6c 100644 --- a/gn/skia/BUILD.gn +++ b/gn/skia/BUILD.gn @@ -412,6 +412,10 @@ config("warnings") { "-Weverything", "-Wno-unknown-warning-option", # Let older Clangs ignore newer Clangs' # warnings. + + # This was deprecated in Clang 14 and removed in Clang 15. It might still + # fire with older Clangs, so disable it explicitly. + "-Wno-weak-template-vtables", ] if (target_cpu == "arm" && is_ios) { diff --git a/src/sksl/analysis/SkSLProgramVisitor.h b/src/sksl/analysis/SkSLProgramVisitor.h index 3b99fec1d6..3a27ef35d1 100644 --- a/src/sksl/analysis/SkSLProgramVisitor.h +++ b/src/sksl/analysis/SkSLProgramVisitor.h @@ -55,15 +55,7 @@ struct ProgramVisitorTypes { using UniquePtrStatement = const std::unique_ptr; }; -// Squelch bogus Clang warning about template vtables: https://bugs.llvm.org/show_bug.cgi?id=18733 -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wweak-template-vtables" -#endif extern template class TProgramVisitor; -#if defined(__clang__) -#pragma clang diagnostic pop -#endif class ProgramVisitor : public TProgramVisitor { public: diff --git a/src/sksl/transform/SkSLProgramWriter.h b/src/sksl/transform/SkSLProgramWriter.h index d3aa06536c..6e5988aa92 100644 --- a/src/sksl/transform/SkSLProgramWriter.h +++ b/src/sksl/transform/SkSLProgramWriter.h @@ -21,15 +21,7 @@ struct ProgramWriterTypes { using UniquePtrStatement = std::unique_ptr; }; -// Squelch bogus Clang warning about template vtables: https://bugs.llvm.org/show_bug.cgi?id=18733 -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wweak-template-vtables" -#endif extern template class TProgramVisitor; -#if defined(__clang__) -#pragma clang diagnostic pop -#endif class ProgramWriter : public TProgramVisitor { public: