[PATCH] D88411: [clangd] Introduce MemoryTrees

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 5 02:35:35 PDT 2020


sammccall added inline comments.


================
Comment at: clang-tools-extra/clangd/support/MemoryTree.h:35
+
+  /// No copy of the \p Name.
+  MemoryTree *addChild(llvm::StringLiteral Name) { return &createChild(Name); }
----------------
Maybe mention that child pointers are invalidated by future addChild/addDetail


================
Comment at: clang-tools-extra/clangd/support/MemoryTree.h:36
+  /// No copy of the \p Name.
+  MemoryTree *addChild(llvm::StringLiteral Name) { return &createChild(Name); }
+
----------------
actually, why do these return pointers rather than references?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88411



More information about the cfe-commits mailing list