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

Manuel Klimek via cfe-commits cfe-commits at lists.llvm.org
Wed May 4 08:51:28 PDT 2016


klimek added inline comments.

================
Comment at: include-fixer/find-all-symbols/SymbolInfo.h:98-101
@@ +97,6 @@
+
+  static SymbolInfo
+  CreateFunctionSymbolInfo(const std::string &Name, const std::string &FilePath,
+                           const std::vector<Context> &Contexts, int LineNumber,
+                           const FunctionInfo &FuncInfo);
+
----------------
hokein wrote:
> However, changing `SymbolInfo` to class requires us to add many setters/getters in it.
> 
> Currently the `SymbolInfo` is like `ClangTidyOptions` structure. 
So, multiple thoughts:
- generally, I think symbol info would better be an immutable type; that would mean that we wouldn't have setters, just getters, and initialize everything in the constructor
- afaik llvm/clang style  doesn't require accessors just because something is a class
- I believe ClangTidyOptions is a very different use case



http://reviews.llvm.org/D19913





More information about the cfe-commits mailing list