[Lldb-commits] [PATCH] D139973: [llvm] Make llvm::Any similar to std::any

Sergei Barannikov via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 19 02:22:00 PST 2022


barannikov88 added inline comments.


================
Comment at: lldb/include/lldb/Core/RichManglingContext.h:90-91
     assert(parser.has_value());
-    assert(llvm::any_isa<ParserT *>(parser));
+    assert(llvm::any_cast<ParserT *>(&parser));
     return llvm::any_cast<ParserT *>(parser);
   }
----------------
This is not intuitively clear. In assert you pass an address, but in 'return' below the object is passed by reference.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139973



More information about the lldb-commits mailing list