xref: /llvm-project/clang/test/SemaCXX/cxx2b-overloaded-operator-pedantic.cpp (revision ba15d186e5cef2620d562c6c9d9a6d570382cd0a)
1 // RUN: %clang_cc1 -verify -std=c++23 -pedantic %s
2 // RUN: %clang_cc1 -verify=compat -std=c++23 -Wpre-c++23-compat %s
3 
4 // expected-no-diagnostics
5 
6 struct GH61582 {
7   // We accidentally would issue this diagnostic in pedantic mode; show that we
8   // only issue it when enabling the compat warnings now.
9   void operator[](int, int); // compat-warning {{overloaded 'operator[]' with more than one parameter is a C++23 extension}}
10 };
11 
12