[clang] 65c22ac - Silence -Woverloaded-virtual warnings from generated code; NFC

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 6 04:19:15 PDT 2021


Author: Aaron Ballman
Date: 2021-04-06T07:19:07-04:00
New Revision: 65c22acfa4a412066e47c3171ff26fcbd62f970e

URL: https://github.com/llvm/llvm-project/commit/65c22acfa4a412066e47c3171ff26fcbd62f970e
DIFF: https://github.com/llvm/llvm-project/commit/65c22acfa4a412066e47c3171ff26fcbd62f970e.diff

LOG: Silence -Woverloaded-virtual warnings from generated code; NFC

Added: 
    

Modified: 
    clang/utils/TableGen/ClangAttrEmitter.cpp

Removed: 
    


################################################################################
diff  --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp
index 0d8439b697c84..6b76ad8ccc0d1 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()) {


        


More information about the cfe-commits mailing list