[PATCH] D149860: [TextAPI] Introduce SymbolSet

Zixu Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 7 14:01:41 PDT 2023


zixuw added inline comments.


================
Comment at: llvm/include/llvm/TextAPI/InterfaceFile.h:346
+  /// \param Name The name of the symbol.
+  std::optional<const Symbol *> contains(SymbolKind Kind,
+                                         StringRef Name) const {
----------------
nit: why do we need an `std::optional` instead of using the nullptr to indicate non-existence? And if the method returns the query element maybe we should give it another name than `contains`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149860/new/

https://reviews.llvm.org/D149860



More information about the llvm-commits mailing list