[PATCH] D66850: [AST][JSON] Avoid crash when dumping NULL Type as JSON

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 28 05:15:55 PDT 2019


aaron.ballman added a comment.

LGTM, but missing a test case.

In D66850#1648557 <https://reviews.llvm.org/D66850#1648557>, @sidorovd wrote:

> LGTM. I'm not an expert in JSON, but may be it makes sense to move the change a line earlier before creation of pointer representation?


I would prefer it remains where it is -- having the `0x0` in the output for a null pointer is a good thing because it conveys more information than a totally empty `Type` object. We're accidentally inconsistent about this currently (Decl prints 0x0 but Stmt gives an empty object).


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

https://reviews.llvm.org/D66850





More information about the cfe-commits mailing list