[clang] Make -Wpadded cause us to check the layout immediately, always checking (PR #206820)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 15 07:13:30 PDT 2026


================
@@ -962,6 +962,16 @@ class DiagnosticsEngine : public RefCountedBase<DiagnosticsEngine> {
            diag::Severity::Ignored;
   }
 
+  bool areAllIgnored(StringRef Group, SourceLocation Loc) const {
+    llvm::SmallVector<diag::kind> diagsInGroup;
+    bool Failed = Diags->getDiagnosticsInGroup(diag::Flavor::WarningOrError,
+                                               Group, diagsInGroup);
+    assert(!Failed && "Incorrect group name?");
+    (void)Failed;
+    return Diags->getDiagnosticListHighestSeverity(diagsInGroup, Loc, *this) ==
+           diag::Severity::Ignored;
+  }
+
----------------
AaronBallman wrote:

Absolutely fine to split that work off, good call!

https://github.com/llvm/llvm-project/pull/206820


More information about the cfe-commits mailing list