[PATCH] D155383: [clang][AST] TextNodeDumper learned to output exception specifications

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 10 05:37:40 PDT 2023


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

In D155383#4576302 <https://reviews.llvm.org/D155383#4576302>, @strimo378 wrote:

> I added a test case for demonstrating `NoexceptExpr` and `Exceptions` output. I don't know how to produce a FunctionProtoType output with ExceptionSourceDecl and ExceptionSourceTemplate. typedef/using is the only way I know to output types for the current AST dump and all my attempts failed to produce an uninstantiated exception information within a typedef.
>
> Here is an example from my (slightly extended) AST dump where I output every type stored within ASTContext:
>
>   FunctionProtoType #267 0x20c10fd58a0 'void ()' (canonical FunctionProtoType #210 0x20c10fd6580) exceptionspec_uninstantiated
>   |-ExceptionSourceDecl CXXConstructor 0x20c10fd5798 #266 'e' 'void () noexcept(b<__is_same(d<>, d<>)>::c && b<__is_same(d<>, d<>)>::c)'#286 cdecl
>   |-ExceptionSourceTemplate CXXConstructor 0x20c10fd6608 #212 'e' 'void () noexcept(b<__is_same(d<>, d<>)>::c && b<__is_same(d<>, d<f::c...>)>::c)'#251
>   `-BuiltinType #2 0x20c0f5bf7f0 'void'

Then I'd say lets move forward with what you've got -- I recall running into similar issues when working on the JSON node dumper.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155383



More information about the cfe-commits mailing list