jingham added a comment.

I think you have to protect against your dyn_cast failing.



================
Comment at: 
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp:495
 
-  auto &clang_expr = *static_cast<ClangUserExpression *>(&m_expr);
-  if (clang_expr.DidImportCxxModules()) {
+  auto *clang_expr = dyn_cast<ClangUserExpression>(&m_expr);
+  if (clang_expr->DidImportCxxModules()) {
----------------
Don't you need to check the result of the dyn_cast?


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

https://reviews.llvm.org/D59314



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to