Author: Nico Weber
Date: 2025-04-30T09:53:14-04:00
New Revision: 1a14ef1c89bf4632bf25a959142770f190dcaaf1

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

LOG: [clang] Temporarily silence noisy warning for FPEvalMethod in another place

When adding an explicit default copy ctor and assignment operator,
clang emits the diag there, instead of for the class. That's narrow
enough that we can suppress the warning there too.

With this, it only files building a single file (CompilerInvocation.cpp).

See https://github.com/llvm/llvm-project/issues/137600#issuecomment-2842011513

Added: 
    

Modified: 
    clang/include/clang/Basic/LangOptions.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/LangOptions.h 
b/clang/include/clang/Basic/LangOptions.h
index bbebf7af9ede3..ae25c09f837b7 100644
--- a/clang/include/clang/Basic/LangOptions.h
+++ b/clang/include/clang/Basic/LangOptions.h
@@ -76,6 +76,19 @@ class LangOptionsBase {
   using RoundingMode = llvm::RoundingMode;
   using CFBranchLabelSchemeKind = clang::CFBranchLabelSchemeKind;
 
+  LangOptionsBase() = default;
+
+#if defined(__clang__)
+// FIXME: Remove this once the warning is fixed, https://llvm.org/PR137600
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wpreferred-type-bitfield-enum-conversion"
+#endif
+  LangOptionsBase(const LangOptionsBase&) = default;
+  LangOptionsBase& operator=(const LangOptionsBase&) = default;
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+
   enum GCMode { NonGC, GCOnly, HybridGC };
   enum StackProtectorMode { SSPOff, SSPOn, SSPStrong, SSPReq };
 


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to