[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Sema / local-class-friend.cpp
blob6f9af7132c2a16dd16b0457d779dac0f1f62289e
1 // RUN: %clang_cc1 -verify -fsyntax-only %s
2 // expected-no-diagnostics
4 void foo()
5 { class c1 {
6 private:
7 int testVar;
8 public:
9 friend class c2;
12 class c2 {
13 void f(c1 obj) {
14 int a = obj.testVar; // Ok