[cfe-dev] Wrong extern inside no braces linkage specification declaration

Sebastian Redl sebastian.redl at getdesigned.at
Mon Apr 26 02:10:51 PDT 2010

On Mon, 26 Apr 2010 10:59:33 +0200, Abramo Bagnara
<abramo.bagnara at gmail.com> wrote:
> This patch is not about whether or not the inner Decl should be
> interpreted as declaration or a definition, neither it has to do with
> whether or not the linkage of the declaration should be interpreted as
> extern (in both cases clang's behavior is correct).
> Rather, the patch is only addressing whether or not the "extern" keyword
> was syntactically written in the source code as a storage specifier.
> This is not the case in the given examples, as the keyword is
> syntactically written as a linkage specification.
> Note that if you query those Decl by method getStorageClass() you will
> still obtain Extern. On the other hand, if you call
> getStorageClassAsWritten(), you will obtain None.

You're right, of course. Sorry for that.


More information about the cfe-dev mailing list