diff options
author | Anders Carlsson <andersca@mac.com> | 2008-02-15 07:04:12 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2008-02-15 07:04:12 +0000 |
commit | f78915fa196b3d284ad756f65eecadaefef71eef (patch) | |
tree | 6de9c10f69bdfc2309ea46c272b0321db09383f3 /Sema/SemaDecl.cpp | |
parent | f963339f63e37057c7f397b3ecf5bfb49f6b48b9 (diff) |
Get rid of AttributeList in the AST and use the new Attr class instead
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Sema/SemaDecl.cpp')
-rw-r--r-- | Sema/SemaDecl.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp index fc60a7a4aa..f21ba70c76 100644 --- a/Sema/SemaDecl.cpp +++ b/Sema/SemaDecl.cpp @@ -14,6 +14,7 @@ #include "Sema.h" #include "clang/AST/ASTConsumer.h" #include "clang/AST/ASTContext.h" +#include "clang/AST/Attr.h" #include "clang/AST/Builtins.h" #include "clang/AST/Decl.h" #include "clang/AST/Expr.h" @@ -737,10 +738,8 @@ Sema::ActOnDeclarator(Scope *S, Declarator &D, DeclTy *lastDecl) { FunctionDecl *NewFD = new FunctionDecl(D.getIdentifierLoc(), II, R, SC, D.getDeclSpec().isInlineSpecified(), - LastDeclarator, - D.getDeclSpec().getAttributes()); - - // Transfer ownership of DeclSpec attributes to FunctionDecl + LastDeclarator); + // FIXME: Handle attributes. D.getDeclSpec().clearAttributes(); // Merge the decl with the existing one if appropriate. Since C functions @@ -989,7 +988,9 @@ Sema::ActOnParamDeclarator(struct DeclaratorChunk::ParamInfo &PI, Scope *FnScope parmDeclType = Context.getPointerType(parmDeclType); ParmVarDecl *New = new ParmVarDecl(PI.IdentLoc, II, parmDeclType, - VarDecl::None, 0, PI.AttrList); + VarDecl::None, 0); + // FIXME: Handle attributes + if (PI.InvalidType) New->setInvalidDecl(); |