Unverified Commit 7b804893 authored by Artem Yurchenko's avatar Artem Yurchenko Committed by GitHub
Browse files

[clang][AST] fix ast-print of `extern <lang>` with >=2 declarators (#93131)

Problem: the printer used to ignore all but the first declarator for
unbraced language linkage declarators. Furthemore, that one would be
printed without the final semicolon.

Solution: when there is more than one declarator, we print them in a
braced `extern <lang>` block. If the original declaration was unbraced
and there is one or less declarator, we omit the braces, but add the
semicolon.

**N.B.** We are printing braces which were, in some cases, absent from
the original CST. If that's an issue, I'll work on it. See the tests for
the examples.
parent 61afebda
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment