diff options
author | Chris Lattner <sabre@nondot.org> | 2008-06-29 00:19:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-06-29 00:19:33 +0000 |
commit | 0bf29ad534c381087e89efadbf7aff0579bf259f (patch) | |
tree | 34b02e62517a7acf994316741ac4220739b55586 /lib/Sema/SemaDeclAttr.cpp | |
parent | e5c5ee1cff9ec084f176fa252774262677857ad2 (diff) |
handle type attributes when converting types, not when processing decls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52877 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 28905314ee..9f63c936e9 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -78,23 +78,8 @@ void Sema::ProcessDeclAttributes(Decl *D, const Declarator &PD) { ProcessDeclAttributeList(D, Attrs); // Finally, apply any attributes on the decl itself. - if (const AttributeList *Attrs = PD.getAttributes()) { + if (const AttributeList *Attrs = PD.getAttributes()) ProcessDeclAttributeList(D, Attrs); - - // If there are any type attributes that were in the declarator, apply them to - // its top-level type. - // FIXME: we shouldn't allow type attributes here. :( - if (ValueDecl *VD = dyn_cast<ValueDecl>(D)) { - QualType DT = VD->getType(); - ProcessTypeAttributes(DT, Attrs); - VD->setType(DT); - } else if (TypedefDecl *TD = dyn_cast<TypedefDecl>(D)) { - QualType DT = TD->getUnderlyingType(); - ProcessTypeAttributes(DT, Attrs); - TD->setUnderlyingType(DT); - } - // FIXME: field decl? - } } /// ProcessDeclAttributeList - Apply all the decl attributes in the specified |