[PATCH] D39290: [rename] Use SymbolOccurrence in RenameLocFinder.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 27 04:04:03 PDT 2017


hokein abandoned this revision.
hokein added inline comments.


================
Comment at: include/clang/Tooling/Refactoring/Rename/SymbolOccurrences.h:74
+    // The declaration in which the nested name is contained (can be nullptr).
+    const Decl *Context;
+    // The nested name being replaced (can be nullptr).
----------------
ioeric wrote:
> A `SymbolOccurrence` is likely to out-live an AST (e.g. when used in clang-refactor or serialized to files), so it might not be safe to store references to ASTs here. If we really want AST information in the `SymbolOccurrence`, we could probably derive from it and use only internally. But it doesn't make sense to pass AST references out to users.
Yeah, right. It is not a good idea to add AST information in the SymbolOccurrence as it is out range of `Rule`. On the second thought, we don't need to add this information. Let's close this revision.


https://reviews.llvm.org/D39290





More information about the cfe-commits mailing list