diff options
author | Sirraide <aeternalmail@gmail.com> | 2025-04-02 10:40:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-02 10:40:05 +0200 |
commit | 10c6ebc42711fa12ff790f3462cbce0e02538ab7 (patch) | |
tree | 060ac5e7a147b97244bd7dbbf1f6dde6ac5f25ce /clang/lib/Parse/ParseDecl.cpp | |
parent | 41d718b1cf3db952a79c5598dba2e3379ee88efa (diff) | |
download | llvm-10c6ebc42711fa12ff790f3462cbce0e02538ab7.zip llvm-10c6ebc42711fa12ff790f3462cbce0e02538ab7.tar.gz llvm-10c6ebc42711fa12ff790f3462cbce0e02538ab7.tar.bz2 |
Reapply "[Clang] [NFC] Introduce a helper for emitting compatibility diagnostics (#132348)" (#134043)
This reapplies #132348 with a fix to the python bindings tests, reverting
https://github.com/llvm/llvm-project/commit/076397ff3217cf45fd08024dd7bcd2bc8fb229ab.
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 3f15640..d77400e 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -5452,11 +5452,8 @@ void Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, BaseRange = SourceRange(ColonLoc, DeclaratorInfo.getSourceRange().getEnd()); if (!getLangOpts().ObjC) { - if (getLangOpts().CPlusPlus11) - Diag(ColonLoc, diag::warn_cxx98_compat_enum_fixed_underlying_type) - << BaseRange; - else if (getLangOpts().CPlusPlus) - Diag(ColonLoc, diag::ext_cxx11_enum_fixed_underlying_type) + if (getLangOpts().CPlusPlus) + DiagCompat(ColonLoc, diag_compat::enum_fixed_underlying_type) << BaseRange; else if (getLangOpts().MicrosoftExt && !getLangOpts().C23) Diag(ColonLoc, diag::ext_ms_c_enum_fixed_underlying_type) |