This mimics the style of https://github.com/llvm/llvm-project/commit/90010c2e1d60c6a9a4a0b30a113d4dae2b7214eb.
Since ExportDecl and LinkageSpec are transparent DeclContext, they share some similarity. I've checked the test case linked in the revision would fail before this patch.