Add a new Ignored attribute type, and use it for may_alias.

llvm-svn: 64446
This commit is contained in:
Anders Carlsson 2009-02-13 08:16:43 +00:00
parent 63784f4e5e
commit b4f3134ca3
3 changed files with 5 additions and 0 deletions

View File

@ -81,6 +81,7 @@ public:
AT_nsobject,
AT_cleanup,
AT_nodebug,
IgnoredAttribute,
UnknownAttribute
};

View File

@ -89,6 +89,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo *Name) {
case 9:
if (!memcmp(Str, "dllimport", 9)) return AT_dllimport;
if (!memcmp(Str, "dllexport", 9)) return AT_dllexport;
if (!memcmp(Str, "may_alias", 9)) return IgnoredAttribute;
break;
case 10:
if (!memcmp(Str, "deprecated", 10)) return AT_deprecated;

View File

@ -1372,6 +1372,9 @@ static void ProcessDeclAttribute(Decl *D, const AttributeList &Attr, Sema &S) {
case AttributeList::AT_pure: HandlePureAttr (D, Attr, S); break;
case AttributeList::AT_cleanup: HandleCleanupAttr (D, Attr, S); break;
case AttributeList::AT_nodebug: HandleNodebugAttr (D, Attr, S); break;
case AttributeList::IgnoredAttribute:
// Just ignore
break;
default:
#if 0
// TODO: when we have the full set of attributes, warn about unknown ones.