[PATCH] D65573: Add User docs for ASTImporter
Adrian Prantl via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 1 09:59:10 PDT 2019
aprantl added a comment.
Thanks, the extra documentation is highly appreciated!
================
Comment at: clang/docs/LibASTImporter.rst:19
+``ASTContext`` holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic analysis of a file.
+There are cases when we would like to work with more than one ``ASTContext``.
+For example, we'd like to parse multiple different files inside the same Clang tool.
----------------
Stylistic note: usually LLVM documentation is written avoiding "we". So for example:
```
In some cases it is preferable to work with more than one ``ASTContext``, for example when parsing multiple files inside one Clang-based tool.
```
================
Comment at: clang/docs/LibASTImporter.rst:33
+By importing one AST node we copy that node into the destination ``ASTContext``.
+Why do we have to copy the node?
+Isn't enough just to insert the pointer to that node into the destination context?
----------------
Importing ... copies that node ...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65573/new/
https://reviews.llvm.org/D65573
More information about the cfe-commits
mailing list