clang/test/Parser/objc-delayed-method-use-after-free.m
raw| 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 |
| 5 | |
| 6 | @implementation Foo |
| 7 | - (void)foo { |
| 8 | |
| 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]; |
| 12 | } |
| 13 | @end |