aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-06-29 00:02:00 +0000
committerChris Lattner <sabre@nondot.org>2008-06-29 00:02:00 +0000
commit3ff30c8e6eaf995c0f969890b48cab15bae4d519 (patch)
treebe64eec3a189380392cb60b6b3c21718b62ea7fe /lib/Sema/SemaDecl.cpp
parentf2e4bd51aa7dc095cefcbcfec573d6bb29f04c5a (diff)
move some code from all callers of ProcessDeclAttributes into
the implementation of ProcessDeclAttributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52875 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 7fa180ccef..6b528b6bed 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -612,8 +612,7 @@ Sema::ActOnDeclarator(Scope *S, Declarator &D, DeclTy *lastDecl) {
if (!NewTD) return 0;
// Handle attributes prior to checking for duplicates in MergeVarDecl
- ProcessDeclAttributes(NewTD, D.getDeclSpec().getAttributes(),
- D.getAttributes());
+ ProcessDeclAttributes(NewTD, D);
// Merge the decl with the existing one if appropriate. If the decl is
// in an outer scope, it isn't the same thing.
if (PrevDecl && IdResolver.isDeclInScope(PrevDecl, CurContext, S)) {
@@ -652,8 +651,7 @@ Sema::ActOnDeclarator(Scope *S, Declarator &D, DeclTy *lastDecl) {
II, R, SC, isInline,
LastDeclarator);
// Handle attributes.
- ProcessDeclAttributes(NewFD, D.getDeclSpec().getAttributes(),
- D.getAttributes());
+ ProcessDeclAttributes(NewFD, D);
// Copy the parameter declarations from the declarator D to
// the function declaration NewFD, if they are available.
@@ -745,8 +743,7 @@ Sema::ActOnDeclarator(Scope *S, Declarator &D, DeclTy *lastDecl) {
II, R, SC, LastDeclarator);
}
// Handle attributes prior to checking for duplicates in MergeVarDecl
- ProcessDeclAttributes(NewVD, D.getDeclSpec().getAttributes(),
- D.getAttributes());
+ ProcessDeclAttributes(NewVD, D);
// Emit an error if an address space was applied to decl with local storage.
// This includes arrays of objects with address space qualifiers, but not
@@ -1456,8 +1453,7 @@ Sema::ActOnParamDeclarator(Scope *S, Declarator &D) {
if (II)
PushOnScopeChains(New, S);
- ProcessDeclAttributes(New, D.getDeclSpec().getAttributes(),
- D.getAttributes());
+ ProcessDeclAttributes(New, D);
return New;
}
@@ -1849,8 +1845,7 @@ Sema::DeclTy *Sema::ActOnField(Scope *S,
// FIXME: Chain fielddecls together.
FieldDecl *NewFD = FieldDecl::Create(Context, Loc, II, T, BitWidth);
- ProcessDeclAttributes(NewFD, D.getDeclSpec().getAttributes(),
- D.getAttributes());
+ ProcessDeclAttributes(NewFD, D);
if (D.getInvalidType() || InvalidDecl)
NewFD->setInvalidDecl();
@@ -1913,8 +1908,7 @@ Sema::DeclTy *Sema::ActOnIvar(Scope *S,
ObjCIvarDecl *NewID = ObjCIvarDecl::Create(Context, Loc, II, T);
- ProcessDeclAttributes(NewID, D.getDeclSpec().getAttributes(),
- D.getAttributes());
+ ProcessDeclAttributes(NewID, D);
if (D.getInvalidType() || InvalidDecl)
NewID->setInvalidDecl();