summaryrefslogtreecommitdiffstats
path: root/clang/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/Sema/SemaDecl.cpp')
-rw-r--r--clang/Sema/SemaDecl.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/Sema/SemaDecl.cpp b/clang/Sema/SemaDecl.cpp
index df6dd5c2e18..26528485db1 100644
--- a/clang/Sema/SemaDecl.cpp
+++ b/clang/Sema/SemaDecl.cpp
@@ -255,6 +255,8 @@ FunctionDecl *Sema::MergeFunctionDecl(FunctionDecl *New, ScopedDecl *OldD) {
Diag(OldD->getLocation(), diag::err_previous_definition);
return New;
}
+
+ // FIXME: propagate old Attrs to the New decl
QualType OldQType = Old->getCanonicalType();
QualType NewQType = New->getCanonicalType();
@@ -1778,6 +1780,9 @@ void Sema::HandleDeclAttribute(Decl *New, AttributeList *Attr) {
vDecl->setType(newType);
}
break;
+ case AttributeList::AT_deprecated:
+ New->addAttr(new DeprecatedAttr());
+ break;
case AttributeList::AT_aligned:
HandleAlignedAttribute(New, Attr);
break;
@@ -1791,7 +1796,11 @@ void Sema::HandleDeclAttribute(Decl *New, AttributeList *Attr) {
HandleNoReturnAttribute(New, Attr);
break;
default:
- // FIXME: add other attributes...
+#if 0
+ // TODO: when we have the full set of attributes, warn about unknown ones.
+ Diag(Attr->getLoc(), diag::warn_attribute_ignored,
+ Attr->getName()->getName());
+#endif
break;
}
}
OpenPOWER on IntegriCloud