[PATCH] D67057: [AST][JSON] Generate parent context id from Decl* instead of DeclContext*

Bert Belder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 1 18:16:31 PDT 2019


piscisaureus created this revision.
piscisaureus added a reviewer: aaron.ballman.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Because of multiple inheritance, a DeclContext pointer does not produce
the same pointer representation as a Decl pointer that references the
same AST Node.

When dumping the parentDeclContextId field of a node, convert the pointer
to Decl* first, so the id can be used to find the AST node it references.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D67057

Files:
  clang/lib/AST/JSONNodeDumper.cpp
  clang/test/AST/ast-dump-decl-context-json.cpp
  clang/test/AST/ast-dump-decl-json.c
  clang/test/AST/ast-dump-funcs-json.cpp
  clang/test/AST/ast-dump-template-decls-json.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67057.218282.patch
Type: text/x-patch
Size: 12017 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190902/76e30354/attachment-0001.bin>


More information about the cfe-commits mailing list