File tree 2 files changed +12
-1
lines changed
lib/StaticAnalyzer/Checkers/WebKit
test/Analysis/Checkers/WebKit
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ bool tryToFindPtrOrigin(
33
33
E = tempExpr->getSubExpr ();
34
34
continue ;
35
35
}
36
- if (auto *tempExpr = dyn_cast<CXXTemporaryObjectExpr >(E)) {
36
+ if (auto *tempExpr = dyn_cast<CXXConstructExpr >(E)) {
37
37
if (auto *C = tempExpr->getConstructor ()) {
38
38
if (auto *Class = C->getParent (); Class && isSafePtr (Class))
39
39
return callback (E, true );
Original file line number Diff line number Diff line change @@ -364,4 +364,15 @@ namespace call_with_explicit_temporary_obj {
364
364
Ref { *provide () }->method ();
365
365
RefPtr { provide () }->method ();
366
366
}
367
+ template <typename T>
368
+ void bar () {
369
+ Ref (*provide ())->method ();
370
+ RefPtr (provide ())->method ();
371
+ }
372
+ void baz () {
373
+ bar<int >();
374
+ }
375
+ }
376
+
377
+ namespace call_with_explicit_construct {
367
378
}
You can’t perform that action at this time.
0 commit comments