Revert "Thread safety analysis: Support copy-elided production of scoped...
Revert "Thread safety analysis: Support copy-elided production of scoped capabilities through arbitrary calls" This caused false positives, see comment on the code review. > When support for copy elision was initially added in e97654b2, it > was taking attributes from a constructor call, although that constructor > call is actually not involved. It seems more natural to use attributes > on the function returning the scoped capability, which is where it's > actually coming from. This would also support a number of interesting > use cases, like producing different scope kinds without the need for tag > types, or producing scopes from a private mutex. > > Changing the behavior was surprisingly difficult: we were not handling > CXXConstructorExpr calls like regular calls but instead handled them > through the DeclStmt they're contained in. This was based on the > assumption that constructors are basically only called in variable > declarations (not true because of temporaries), and that variable > decla...
parent
d7793560
Please register or sign in to comment