Skip to content

[plantuml parser] cover template special case#355

Merged
hoe-jo merged 1 commit into
mainfrom
joho_fix_parser_panic
Jul 22, 2026
Merged

[plantuml parser] cover template special case#355
hoe-jo merged 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 2 times, most recently from 6d87bc5 to 0c34a19 Compare July 21, 2026 11:49
- 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 0c34a19 to c3cb0c6 Compare July 22, 2026 04:40
@hoe-jo
hoe-jo merged commit bf25920 into main Jul 22, 2026
14 checks passed
@hoe-jo
hoe-jo deleted the joho_fix_parser_panic branch July 22, 2026 07:57
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.

3 participants