Index: lib/Basic/Diagnostic.cpp =================================================================== --- lib/Basic/Diagnostic.cpp +++ lib/Basic/Diagnostic.cpp @@ -248,6 +248,13 @@ bool DiagnosticsEngine::setSeverityForGroup(diag::Flavor Flavor, StringRef Group, diag::Severity Map, SourceLocation Loc) { + // Special handling for pragma clang diagnostic ... "-Weverything" + // There is no formal group named "everything", so there has to be a special + // case for it. + if (Group == "everything") { + setSeverityForAll(Flavor, Map, Loc); + return false; + } // Get the diagnostics in this group. SmallVector GroupDiags; if (Diags->getDiagnosticsInGroup(Flavor, Group, GroupDiags)) Index: test/Frontend/Peverything.cpp =================================================================== --- test/Frontend/Peverything.cpp +++ test/Frontend/Peverything.cpp @@ -0,0 +1,6 @@ +// RUN: %clang_cc1 %s -fsyntax-only -verify +#pragma clang diagnostic error "-Weverything" + +void ppp() // expected-error {{no previous prototype for function 'ppp'}} +{ +}