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

Douglas Gregor dgregor at apple.com
Tue Apr 16 07:05:49 PDT 2013


On Apr 13, 2013, at 6:22 PM, Enea Zaffanella <zaffanella at cs.unipr.it> wrote:

> On 03/31/2013 07:00 PM, Rafael EspĂ­ndola wrote:
>> For variables and functions clang stores two storage classes. The one
>> "as written" in the code and a patched one, which, for example,
>> propagates static to the following decls.
>> 
>> This apparently is from the days clang lacked linkage computation. It
>> is now redundant and this patch removes it.
>> 
>> Cheers,
>> Rafael
> 
> $ cat bug.cc
> extern "C" void foo();
> 
> $ clang -cc1 -ast-print bug.cc
> extern "C" extern void foo()
> 
> 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.

	- Doug



More information about the cfe-commits mailing list