[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CXX / drs / cwg2771.cpp
blob474660aa284404b5113442c43d342226d1d98ad3
1 // RUN: %clang_cc1 -std=c++23 %s -ast-dump | FileCheck --check-prefixes=CXX23 %s
3 namespace cwg2771 { // cwg2771: 18
5 struct A{
6 int a;
7 void cwg2771(){
8 int* r = &a;
11 // CXX23: CXXMethodDecl{{.+}}cwg2771
12 // CXX23-NEXT: CompoundStmt
13 // CXX23-NEXT: DeclStmt
14 // CXX23-NEXT: VarDecl
15 // CXX23-NEXT: UnaryOperator
16 // CXX23-NEXT: MemberExpr
17 // CXX23-NEXT: CXXThisExpr{{.+}}'cwg2771::A *'
19 } // namespace cwg2771