[PATCH] D19913: Added static creators that create complete instances of SymbolInfo.

Eric Liu via cfe-commits cfe-commits at lists.llvm.org
Wed May 4 05:38:55 PDT 2016


ioeric added inline comments.

================
Comment at: include-fixer/find-all-symbols/SymbolInfo.h:90-93
@@ +89,6 @@
+
+  static SymbolInfo
+  CreateFunctionSymbolInfo(const std::string &Name, const std::string &FilePath,
+                           const std::vector<Context> &Contexts, int LineNumber,
+                           const FunctionInfo &FuncInfo);
+
----------------
klimek wrote:
> To some degree this looks like we actually want a class hierarchy. But currently only ClassSymbolInfo is used?
At this point yes, since Symbolnfo is only created in InMemoryXrefsDB and FindAllSymbols now, and it is not trivial to change FindAllSymbols to use these creators. 

But one immediate use case I can foresee is converting proto buffer SymbolInfo to clang SymbolInfo when integrating with Google3 XrefsDB. 


http://reviews.llvm.org/D19913





More information about the cfe-commits mailing list