This is an archive of the discontinued LLVM Phabricator instance.

[CFG] [analyzer] NFC: Move construction context allocation into a helper method.
ClosedPublic

Authored by NoQ on Mar 20 2018, 7:48 PM.

Diff Detail

Repository
rC Clang

Event Timeline

NoQ created this revision.Mar 20 2018, 7:48 PM
NoQ updated this revision to Diff 139389.Mar 21 2018, 4:12 PM

I'd rather keep the helper method within the class. This allows us to keep constructors private, which is something i forgot to do originally.

george.karpenkov accepted this revision.Mar 21 2018, 4:28 PM

LGTM, but would actually make even more sense as a static function for the allocator.
E.g. we have llvm::make_shared<>(), so we could also have Allocator::make_obj<...>(...)

This revision is now accepted and ready to land.Mar 21 2018, 4:28 PM
NoQ added a comment.Mar 21 2018, 5:04 PM

E.g. we have llvm::make_shared<>(), so we could also have Allocator::make_obj<...>(...)

I like your thinking, but that'd require me to make the allocator my friend class (:

NoQ retitled this revision from [analyzer] NFC: Move construction context allocation into a helper method. to [CFG] [analyzer] NFC: Move construction context allocation into a helper method..
This revision was automatically updated to reflect the committed changes.