Skip to content

Commit

Permalink
No longer issue pedantic warning about pre-c++2b compat
Browse files Browse the repository at this point in the history
We were accidentally issuing "overloaded 'operator[]' with more than
one parameter is a C++2b extension" with -pedantic because it was an
ExtWarn diagnostic rather than a Warning. This corrects the diagnostic
category and adds some test coverage.

Fixes llvm#61582
  • Loading branch information
AaronBallman authored and Noxime committed Jun 16, 2023
1 parent c6c1506 commit 0adbe74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,10 @@ Bug Fixes to Attribute Support

Bug Fixes to C++ Support
^^^^^^^^^^^^^^^^^^^^^^^^
- No longer issue a pre-C++2b compatibility warning in ``-pedantic`` mode
regading overloaded `operator[]` with more than one parmeter. (`#61582
<https://github.com/llvm/llvm-project/issues/61582>`_)

- Address the thread identification problems in coroutines.
(`#47177 <https://github.com/llvm/llvm-project/issues/47177>`_,
`#47179 <https://github.com/llvm/llvm-project/issues/47179>`_)
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/DiagnosticSemaKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -9184,7 +9184,7 @@ def err_operator_overload_default_arg : Error<

def ext_subscript_overload : Warning<
"overloaded %0 with %select{no|a defaulted|more than one}1 parameter is a "
"C++23 extension">, InGroup<CXXPre23Compat>, DefaultIgnore;
"C++2b extension">, InGroup<CXXPre2bCompat>, DefaultIgnore;
def error_subscript_overload : Error<
"overloaded %0 cannot have %select{no|a defaulted|more than one}1 parameter before C++23">;

Expand Down

0 comments on commit 0adbe74

Please sign in to comment.