llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone-unused-raii-crash.mm

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
253 B
Plaintext
Raw Normal View History

// RUN: clang-tidy %s -checks=-*,bugprone-unused-raii -- | count 0
struct CxxClass {
~CxxClass() {}
};
@interface ObjcClass {
}
- (CxxClass)set:(int)p;
@end
void test(ObjcClass *s) {
[s set:1]; // ok, no crash, no diagnostic emitted.
return;
}