File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
lib/StaticAnalyzer/Checkers/WebKit
test/Analysis/Checkers/WebKit Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ bool tryToFindPtrOrigin(
3333 E = tempExpr->getSubExpr ();
3434 continue ;
3535 }
36- if (auto *tempExpr = dyn_cast<CXXTemporaryObjectExpr >(E)) {
36+ if (auto *tempExpr = dyn_cast<CXXConstructExpr >(E)) {
3737 if (auto *C = tempExpr->getConstructor ()) {
3838 if (auto *Class = C->getParent (); Class && isSafePtr (Class))
3939 return callback (E, true );
Original file line number Diff line number Diff line change @@ -364,4 +364,15 @@ namespace call_with_explicit_temporary_obj {
364364 Ref { *provide () }->method ();
365365 RefPtr { provide () }->method ();
366366 }
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 {
367378}
You can’t perform that action at this time.
0 commit comments