[cfe-commits] r72912 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/Sema.h lib/Sema/SemaDecl.cpp
Daniel Dunbar
daniel at zuster.org
Thu Jun 4 21:37:57 PDT 2009
On Thu, Jun 4, 2009 at 7:44 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> + /// ActOnPragmaPack - Called on well formed #pragma weak ident.
> + virtual void ActOnPragmaWeakID(IdentifierInfo* WeakName,
> + /// ActOnPragmaPack - Called on well formed #pragma weak ident = ident.
> + virtual void ActOnPragmaWeakAlias(IdentifierInfo* WeakName,
Doxygen names are out of sync. Wouldn't it be nice if the compiler
checked this! :)
> +void Sema::ActOnPragmaWeakAlias(IdentifierInfo* Name,
> + IdentifierInfo* AliasName,
> + SourceLocation PragmaLoc,
> + SourceLocation NameLoc,
> + SourceLocation AliasNameLoc) {
> + Decl *PrevDecl = LookupName(TUScope, Name, LookupOrdinaryName);
> +
> + // FIXME: This implementation is an ugly hack!
> + if (PrevDecl) {
> + PrevDecl->addAttr(::new (Context) AliasAttr(AliasName->getName()));
> + return;
> + }
We also need to add the WeakAttr here, right?
- Daniel
More information about the cfe-commits
mailing list