Extended TextNodeDumper::VisitFunctionProtoType to output exception specifications
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I think we at least need some tests for this, looks like we have the AST tests in clang/test/AST/ast-dump*
Comment Actions
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'
Comment Actions
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.