[patch] Don't compute a "patched" storage class

Douglas Gregor dgregor at apple.com
Tue Apr 16 07:51:50 PDT 2013

On Apr 16, 2013, at 3:25 PM, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:

>>> The linkage spec decl (only the variant without braces) seems to propagate its "extern" keyword down to the inner decl as a *written* storage class. I guess this is not really meant.
>> No, this is an anachronism from the days prior to linkage computation. I think it can be zapped.
> To be clear, getStorageClass should return SC_None for
> extern "C" void foo();
> and we should have a separate bit for isSingleLineExternC (to
> implement [dcl.link] p7). Correct?

Or we could just compute isSingleLineExternC by checking whether the DeclContext is a LinkageSpecDecl without braces.

	- Doug

More information about the cfe-commits mailing list