[PATCH] D34512: Add preliminary Cross Translation Unit support library

Whisperity via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 10 03:01:18 PDT 2017


whisperity added inline comments.


================
Comment at: include/clang/CrossTU/CrossTranslationUnit.h:42
+/// Note that this class also implements caching.
+class CrossTranslationUnit {
+public:
----------------
xazax.hun wrote:
> whisperity wrote:
> > Does the name of this class make sense? If I say
> > 
> > 
> > ```
> > CrossTranslationUnit *ctuptr = new CrossTranslationUnit(...);
> > ```
> > 
> > did I construct a new //CrossTranslationUnit//? What even **is** a //CrossTranslationUnit//? Other class names, such as `ASTImporter`, `DiagOpts`, and `FrontendAction`, etc. somehow feel better at ~~transmitting~~ reflecting upon their meaning in their name.
> > 
> > 
> What would you think about `CrossTranslationUnitContext`?
> 
> The functionality of this class is have all the relevant data required for doing Cross TU lookups and also provide the interface for that. 
WFM. I'm not sure whose authority is the class names, but I like it a lot better.


https://reviews.llvm.org/D34512





More information about the cfe-commits mailing list