llvm-project/clang/test/SemaCXX/invalid-this-in-lambda.cpp
Oleksandr T 259caad2f7
[Clang] Fix an assertion failure when checking invalid this (#93490)
Skip explicit this check in non-valid scopes due to `null` type in
lambdas with invalid captures or incomplete parameter lists during
parsing


Fixes #91536
2024-05-28 18:08:38 +02:00

5 lines
179 B
C++

// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
decltype([]()->decltype(this) { }) a; // expected-error {{invalid use of 'this' outside of a non-static member function}}