[PATCH] D60910: [WIP] Dumping the AST to JSON

Don Hinton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 25 09:49:28 PDT 2019


hintonda added a comment.

Looks good, but just a couple of questions.



================
Comment at: include/clang/AST/JSONNodeDumper.h:73
+      Indentation.clear();
+      OS << "\n" << Indentation << "}\n";
+      TopLevel = true;
----------------
Just curious, since you clear Indentation on the previous line, do you need it here?


================
Comment at: include/clang/Frontend/FrontendOptions.h:311
+  /// Specifies the output format of the AST.
+  enum ASTOutputFormat {
+    AOF_Default,
----------------
Why can't you use the enum defined in `clang/AST/ASTDumperUtils.h`?  Seems to make the `dump()` call below unnecessarily ugly.


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

https://reviews.llvm.org/D60910





More information about the cfe-commits mailing list