This is an archive of the discontinued LLVM Phabricator instance.

[Lex] Make HeaderMaps a unique_ptr vector
ClosedPublic

Authored by MaskRay on Aug 18 2018, 10:59 PM.

Diff Detail

Repository
rC Clang

Event Timeline

MaskRay created this revision.Aug 18 2018, 10:59 PM
Eugene.Zelenko added a project: Restricted Project.

Given the context (class an file name itself) and documentation around the function, I don't think in this particular case it improves readability or maintainability, the lifetime of the HeaderMap is (IMHO) fairly obvious from the const qualifier and from the documentation of the function itself. I would say leave it as is.

Given the context (class an file name itself) and documentation around the function, I don't think in this particular case it improves readability or maintainability, the lifetime of the HeaderMap is (IMHO) fairly obvious from the const qualifier and from the documentation of the function itself. I would say leave it as is.

I'd vote in favor of the change - since it makes the ownership obvious at-a-glance (documentation or not) & helps catch any mistakes that can be easily introduced when handling object ownership.

dblaikie accepted this revision.Aug 20 2018, 10:48 AM

Looks good - thanks!

This revision is now accepted and ready to land.Aug 20 2018, 10:48 AM
This revision was automatically updated to reflect the committed changes.