File tree 2 files changed +13
-0
lines changed
lib/StaticAnalyzer/Checkers/WebKit
test/Analysis/Checkers/WebKit
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,8 @@ bool tryToFindPtrOrigin(
84
84
if (isCtorOfSafePtr (ConversionFunc))
85
85
return callback (E, true );
86
86
}
87
+ if (isa<CXXFunctionalCastExpr>(E) && isSafePtrType (cast->getType ()))
88
+ return callback (E, true );
87
89
}
88
90
// FIXME: This can give false "origin" that would lead to false negatives
89
91
// 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 {
407
407
void baz () {
408
408
bar<int >();
409
409
}
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
+ }
410
421
}
411
422
412
423
namespace call_with_explicit_construct {
You can’t perform that action at this time.
0 commit comments