Skip to content

Commit 1a14ef1

Browse files
committed
[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 #137600 (comment)
1 parent b54b3e8 commit 1a14ef1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

clang/include/clang/Basic/LangOptions.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,19 @@ class LangOptionsBase {
7676
using RoundingMode = llvm::RoundingMode;
7777
using CFBranchLabelSchemeKind = clang::CFBranchLabelSchemeKind;
7878

79+
LangOptionsBase() = default;
80+
81+
#if defined(__clang__)
82+
// FIXME: Remove this once the warning is fixed, https://llvm.org/PR137600
83+
#pragma clang diagnostic push
84+
#pragma clang diagnostic ignored "-Wpreferred-type-bitfield-enum-conversion"
85+
#endif
86+
LangOptionsBase(const LangOptionsBase&) = default;
87+
LangOptionsBase& operator=(const LangOptionsBase&) = default;
88+
#if defined(__clang__)
89+
#pragma clang diagnostic pop
90+
#endif
91+
7992
enum GCMode { NonGC, GCOnly, HybridGC };
8093
enum StackProtectorMode { SSPOff, SSPOn, SSPStrong, SSPReq };
8194

0 commit comments

Comments
 (0)