[PATCH] D133499: [clang]: Add DeclContext::dumpAsDecl().

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 3 06:48:32 PDT 2022


erichkeane accepted this revision.
erichkeane added a comment.
This revision is now accepted and ready to land.

Please see the two comments, otherwise this LGTM.  Feel free to fix the below as a part of the commit process.



================
Comment at: clang/lib/AST/ASTDumper.cpp:240
+  // the innerworkings of dyn_cast() do assert that to be the case! Alas,
+  // strange and unfortunate things do occasionally occur that lead to folk
+  // like yourself, dear reader, running a debugger and feeling extraordinarily
----------------
This gets a little overly coy for our comments...


================
Comment at: clang/lib/AST/ASTDumper.cpp:250
+  if (hasValidDeclKind()) {
+    const auto *D = dyn_cast<Decl>(this);
+    D->dump();
----------------
This can now just be 'cast'


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133499



More information about the cfe-commits mailing list