mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 15:36:49 +00:00

fixes https://github.com/llvm/llvm-project/issues/96205 The cause is that some `Conversions[ConvIdx]` here is not initializedeb76bc38ff/clang/lib/Sema/SemaOverload.cpp (L7888-L7901)
and we do not check whether `Cand->Conversions[I]` is initialized or not here.eb76bc38ff/clang/lib/Sema/SemaOverload.cpp (L12148-L12158)
12 lines
400 B
C++
12 lines
400 B
C++
// RUN: %clang_cc1 -std=c++23 -verify -fsyntax-only %s
|
|
|
|
namespace GH96205 {
|
|
|
|
void f() {
|
|
auto l = [](this auto& self, int) -> void { self("j"); }; // expected-error {{no matching function for call to object of type}} \
|
|
// expected-note {{no known conversion from 'const char[2]' to 'int'}}
|
|
l(3); // expected-note {{requested here}}
|
|
}
|
|
|
|
}
|