After accepted in Kona, update the code to accept static operator[] as well.
No big code changes: accept this operator as static in SemaDeclCXX, update AST call generation in SemaOverload and update feature macros + tests accordingly.
Paths
| Differential D138387
[Clang] Implement static operator[] ClosedPublic Authored by royjacobson on Nov 20 2022, 2:35 PM.
Details
Summary After accepted in Kona, update the code to accept static operator[] as well. No big code changes: accept this operator as static in SemaDeclCXX, update AST call generation in SemaOverload and update feature macros + tests accordingly.
Diff Detail
Event TimelineComment Actions Thanks for working on this, it was fast!
Comment Actions
Comment Actions Beside the formatting nitpick this looks good
This revision is now accepted and ready to land.Nov 22 2022, 8:16 AM royjacobson added inline comments.
Comment Actions
Thanks! I'll wait until next week to let other people have a chance to take a look. Closed by commit rG3faf1f17a5c3: [Clang] Implement static operator[] (authored by royjacobson). · Explain WhyNov 29 2022, 2:40 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 478493 clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Frontend/InitPreprocessor.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaOverload.cpp
clang/test/CXX/over/over.oper/p7.cpp
clang/test/CodeGenCXX/cxx2b-static-call-operator.cpp
clang/test/CodeGenCXX/cxx2b-static-subscript-operator.cpp
clang/test/Lexer/cxx-features.cpp
clang/www/cxx_status.html
|
Hum, I did not notice that before but this looks wrong.
If I get that right, this is how it's usually done.
ie it should not be err_ (it's a warning) and in C++23 mode it's not an ExtWarn (which are turned into error in pendantic mode afaik). There are many similar patterns in the same file