[PATCH] D50945: [Lex] Make HeaderMaps a unique_ptr vector

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 20 10:47:46 PDT 2018


dblaikie added a comment.

In https://reviews.llvm.org/D50945#1205337, @kristina wrote:

> 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.


Repository:
  rC Clang

https://reviews.llvm.org/D50945





More information about the cfe-commits mailing list