From 65c22acfa4a412066e47c3171ff26fcbd62f970e Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 6 Apr 2021 07:18:24 -0400 Subject: [PATCH] Silence -Woverloaded-virtual warnings from generated code; NFC --- clang/utils/TableGen/ClangAttrEmitter.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp index 0d8439b697c84f..6b76ad8ccc0d1c 100644 --- a/clang/utils/TableGen/ClangAttrEmitter.cpp +++ b/clang/utils/TableGen/ClangAttrEmitter.cpp @@ -3672,6 +3672,11 @@ static void GenerateMutualExclusionsChecks(const Record &Attr, } } + // If there are any decl or stmt attributes, silence -Woverloaded-virtual + // warnings for them both. + if (!DeclAttrs.empty() || !StmtAttrs.empty()) + OS << " using ParsedAttrInfo::diagMutualExclusion;\n\n"; + // If we discovered any decl or stmt attributes to test for, generate the // predicates for them now. if (!DeclAttrs.empty()) {