Skip to content

[plantuml parser] cover template special case#355

Open
hoe-jo wants to merge 1 commit into
mainfrom
joho_fix_parser_panic
Open

[plantuml parser] cover template special case#355
hoe-jo wants to merge 1 commit into
mainfrom
joho_fix_parser_panic

Conversation

@hoe-jo

@hoe-jo hoe-jo commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@hoe-jo
hoe-jo force-pushed the joho_fix_parser_panic branch from bcdb26d to 1a1c777 Compare July 21, 2026 07:33
@hoe-jo hoe-jo changed the title [plantuml parser] change panic to warning so parsing succeeds [plantuml parser] cover template special case Jul 21, 2026
@melodyoncode

Copy link
Copy Markdown
Contributor

Looks good to me.

Nit: Could we add an integration test for this?

The new unit tests cover ResolvedType::Dependent, but the key behavior depends on how libclang exposes real C++ types. It would be useful to cover both sides of decltype(...):

  • template-dependent decltype, e.g. a base class using decltype(is_x_impl(std::declval<T>())), which cannot be resolved without template instantiation and should not panic;
  • non-template/concrete decltype, e.g. following a concrete API return type, which should still resolve to the actual return type when libclang provides canonical type information.

That would make the intended scope of the change much clearer and guard against accidentally treating all decltype usages as dependent.

@hoe-jo
hoe-jo force-pushed the joho_fix_parser_panic branch from 1a1c777 to 6d87bc5 Compare July 21, 2026 11:41
- dont panic if type cannot be resolved for Templates, e.g.
  template <typename T>
  decltype(...(std::declval<T>())) {};
@hoe-jo
hoe-jo force-pushed the joho_fix_parser_panic branch from 6d87bc5 to 0c34a19 Compare July 21, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants