File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
lib/StaticAnalyzer/Checkers/WebKit
test/Analysis/Checkers/WebKit Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,8 @@ bool tryToFindPtrOrigin(
8484 if (isCtorOfSafePtr (ConversionFunc))
8585 return callback (E, true );
8686 }
87+ if (isa<CXXFunctionalCastExpr>(E) && isSafePtrType (cast->getType ()))
88+ return callback (E, true );
8789 }
8890 // FIXME: This can give false "origin" that would lead to false negatives
8991 // in checkers. See https://reviews.llvm.org/D37023 for reference.
Original file line number Diff line number Diff line change @@ -407,6 +407,17 @@ namespace call_with_explicit_temporary_obj {
407407 void baz () {
408408 bar<int >();
409409 }
410+
411+ class Foo {
412+ Ref<RefCountable> ensure ();
413+ void foo () {
414+ Ref { ensure () }->method ();
415+ }
416+ };
417+
418+ void baz (Ref<RefCountable>&& arg) {
419+ Ref { arg }->method ();
420+ }
410421}
411422
412423namespace call_with_explicit_construct {
You can’t perform that action at this time.
0 commit comments