cor3ntin added inline comments.
================ Comment at: clang/test/SemaCXX/cxx2b-overloaded-operator.cpp:101 + int arr[] = {1, 2, 3}; + return arr[Is...]; // expected-error 2{{type 'int[3]' does not provide a subscript operator}} +} ---------------- shafik wrote: > The diagnostic is not great. Indeed. The issue is that we only add the built-in to the set of candidates if there are two args (ie one index, after expansion). So we cannot produce a nice error with mismatching arity. I looked into changing that but it requires some refactor to how we add built-in to the overload set and diagnose built-ins. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149637/new/ https://reviews.llvm.org/D149637 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits