Author: Florian Mayer Date: 2024-09-13T15:01:27-07:00 New Revision: f885e02cf7cac1b08cab4cd526773420076029dd
URL: https://github.com/llvm/llvm-project/commit/f885e02cf7cac1b08cab4cd526773420076029dd DIFF: https://github.com/llvm/llvm-project/commit/f885e02cf7cac1b08cab4cd526773420076029dd.diff LOG: Revert "[clang] Silence GCC warnings about control reaching end of non void function" This reverts commit 90a2e0bb423629b7e70f4b91adb44851199dd5ea. Reverting parent CL Pull Request: https://github.com/llvm/llvm-project/pull/108646 Added: Modified: clang/include/clang/Basic/DiagnosticIDs.h clang/lib/Sema/SemaOverload.cpp Removed: ################################################################################ diff --git a/clang/include/clang/Basic/DiagnosticIDs.h b/clang/include/clang/Basic/DiagnosticIDs.h index daad66f499538f..2402996ece5c94 100644 --- a/clang/include/clang/Basic/DiagnosticIDs.h +++ b/clang/include/clang/Basic/DiagnosticIDs.h @@ -18,7 +18,6 @@ #include "clang/Basic/LLVM.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/ErrorHandling.h" #include <optional> #include <vector> @@ -311,7 +310,6 @@ class DiagnosticIDs : public RefCountedBase<DiagnosticIDs> { return {diag::Severity::Fatal, std::string(Message), CLASS_ERROR, /*ShowInSystemHeader*/ true}; } - llvm_unreachable("Fully covered switch above!"); }()); } diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index 382630ed674107..d3e009a658f0e8 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -7331,7 +7331,6 @@ static bool diagnoseDiagnoseIfAttrsWith(Sema &S, const NamedDecl *ND, case DiagnoseIfAttr::DS_error: return diag::Severity::Error; } - llvm_unreachable("Fully covered switch above!"); }; for (const auto *DIA : llvm::make_range(WarningBegin, Attrs.end())) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits