diff options
Diffstat (limited to 'clang/test/Analysis/osobject-retain-release.cpp')
-rw-r--r-- | clang/test/Analysis/osobject-retain-release.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Analysis/osobject-retain-release.cpp b/clang/test/Analysis/osobject-retain-release.cpp index 35d91add1a9..98b3e95abfd 100644 --- a/clang/test/Analysis/osobject-retain-release.cpp +++ b/clang/test/Analysis/osobject-retain-release.cpp @@ -702,3 +702,16 @@ OSObject *testSuppressionForMethodsEndingWithMatching(IOService *svc, // returning from it at +0. return table; // no-warning } + +namespace weird_result { +struct WeirdResult { + int x, y, z; +}; + +WeirdResult outParamWithWeirdResult(OS_RETURNS_RETAINED_ON_ZERO OSObject **obj); + +WeirdResult testOutParamWithWeirdResult() { + OSObject *obj; + return outParamWithWeirdResult(&obj); // no-warning +} +} // namespace weird_result |