[clang] 1bef229 - [clang] Delete unused class DiagsUninitializedSeveretyRAII

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 13 11:29:13 PDT 2021


Author: Nico Weber
Date: 2021-10-13T14:27:26-04:00
New Revision: 1bef22950a5c72fe630f4d6aa7f161bc1e2cb2d1

URL: https://github.com/llvm/llvm-project/commit/1bef22950a5c72fe630f4d6aa7f161bc1e2cb2d1
DIFF: https://github.com/llvm/llvm-project/commit/1bef22950a5c72fe630f4d6aa7f161bc1e2cb2d1.diff

LOG: [clang] Delete unused class DiagsUninitializedSeveretyRAII

Added: 
    

Modified: 
    clang/lib/Sema/SemaOpenMP.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index da78212e29f4..2e8f20886680 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -15884,29 +15884,6 @@ OMPClause *Sema::ActOnOpenMPPrivateClause(ArrayRef<Expr *> VarList,
                                   PrivateCopies);
 }
 
-namespace {
-class DiagsUninitializedSeveretyRAII {
-private:
-  DiagnosticsEngine &Diags;
-  SourceLocation SavedLoc;
-  bool IsIgnored = false;
-
-public:
-  DiagsUninitializedSeveretyRAII(DiagnosticsEngine &Diags, SourceLocation Loc,
-                                 bool IsIgnored)
-      : Diags(Diags), SavedLoc(Loc), IsIgnored(IsIgnored) {
-    if (!IsIgnored) {
-      Diags.setSeverity(/*Diag*/ diag::warn_uninit_self_reference_in_init,
-                        /*Map*/ diag::Severity::Ignored, Loc);
-    }
-  }
-  ~DiagsUninitializedSeveretyRAII() {
-    if (!IsIgnored)
-      Diags.popMappings(SavedLoc);
-  }
-};
-}
-
 OMPClause *Sema::ActOnOpenMPFirstprivateClause(ArrayRef<Expr *> VarList,
                                                SourceLocation StartLoc,
                                                SourceLocation LParenLoc,


        


More information about the cfe-commits mailing list