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

Enea Zaffanella zaffanella at cs.unipr.it
Sat Apr 13 10:22:26 PDT 2013

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.


More information about the cfe-commits mailing list