[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Parser / objc-delayed-method-use-after-free.m
blob83927b2c7051752570f57c3bfc858399481b800c
1 // Make sure we don't trigger use-after-free when we encounter a code completion
2 // token inside a objc method.
3 @interface Foo
4 @end
6 @implementation Foo
7 - (void)foo {
9 // RUN: %clang_cc1 -fsyntax-only -Wno-objc-root-class -code-completion-at=%s:%(line-1):1 %s | FileCheck %s
10 // CHECK: COMPLETION: self : [#Foo *#]self
11   [self foo];
13 @end