1 | // RUN: clang-tidy %s -checks=-*,bugprone-unused-raii -- | count 0 |
---|---|
2 | |
3 | struct CxxClass { |
4 | ~CxxClass() {} |
5 | }; |
6 | |
7 | @interface ObjcClass { |
8 | } |
9 | - (CxxClass)set:(int)p; |
10 | @end |
11 | |
12 | void test(ObjcClass *s) { |
13 | [s set:1]; // ok, no crash, no diagnostic emitted. |
14 | return; |
15 | } |
16 |