ioeric added a comment.

Could you elaborate on the intention of this change? Is the intention of having 
more information in `SymbolOccurrence` to benefit users of the rename library 
or to simplify the internal implementation?



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


https://reviews.llvm.org/D39290



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to